Subject: | Bug in X11::WMCtrl 0.01 |
&X11::WMCtrl::wmctrl invokes readline() against WMCTRL in a while() loop without first localizing $_. The attached diff wraps the while() loop in a block with a localized $_.
--- WMCtrl.pm.orig 2005-06-05 19:49:51.000000000 -0500
+++ WMCtrl.pm 2005-06-05 19:51:57.000000000 -0500
@@ -377,9 +377,12 @@
my @args = @_;
open(WMCTRL, sprintf('%s %s|', $self->{wmctrl}, join(' ', @args)));
my $data;
- while (<WMCTRL>) {
- $data .= $_;
- }
+ {
+ local $_;
+ while (<WMCTRL>) {
+ $data .= $_;
+ }
+ }
close(WMCTRL);
return $data;
}