i3test.pm: use strict; use warnings; and fix related bugs

This commit is contained in:
Maik Fischer
2011-10-11 13:13:42 +01:00
committed by Michael Stapelberg
parent 27dadb4ad9
commit fce422d99e
2 changed files with 5 additions and 4 deletions

View 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];
}