]> git.sur5r.net Git - i3/i3/blobdiff - testcases/lib/i3test.pm
i3test.pm: use strict; use warnings; and fix related bugs
[i3/i3] / testcases / lib / i3test.pm
index 9b7cc13809944448c9b4af56569cf9b240a81633..39fd7a94e05195cd6ee985ce7e16b62e3b95cc29 100644 (file)
@@ -1,5 +1,6 @@
 package i3test;
 # vim:ts=4:sw=4:expandtab
+use strict; use warnings;
 
 use File::Temp qw(tmpnam tempfile tempdir);
 use Test::Builder;
@@ -243,7 +244,7 @@ sub get_focused {
         $lf = $focused[0];
         last unless defined($con->{focus});
         @focused = @{$con->{focus}};
-        @cons = grep { $_->{id} == $lf } (@{$con->{nodes}}, @{$con->{'floating_nodes'}});
+        my @cons = grep { $_->{id} == $lf } (@{$con->{nodes}}, @{$con->{'floating_nodes'}});
         $con = $cons[0];
     }