Skip to content

Commit

Permalink
dont define function out of usage scope
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch authored and Gonéri Le Bouder committed May 24, 2012
1 parent 637ff70 commit 8562acd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Screen.pm
Expand Up @@ -117,16 +117,16 @@ sub _getScreensFromUnix {

my @screens;

my $wanted = sub {
return unless $File::Find::name =~ m{(/edid)$};
open my $t, "<$File::Find::name";
my $edid = <$t>;
close $t;
if (-d '/sys') {
my $wanted = sub {
return unless $File::Find::name =~ m{(/edid)$};
open my $t, "<$File::Find::name";
my $edid = <$t>;
close $t;

push @screens, { edid => $edid } if $edid;
};
push @screens, { edid => $edid } if $edid;
};

if (-d '/sys') {
File::Find::find($wanted, '/sys');
}

Expand Down

0 comments on commit 8562acd

Please sign in to comment.