diff options
author | lloyd <[email protected]> | 2008-02-14 15:29:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-02-14 15:29:52 +0000 |
commit | 030c4f7d5ced92d6a0e83e2f62d312f262cf2f4c (patch) | |
tree | c412ba14955febed065baeb32c5636d415096319 /configure.pl | |
parent | 862a377961b21cafb1313fdcd9e0ef785514695e (diff) |
Pass the second argument of works_on as a reference, requires slightly
fewer explicit coercions.
Diffstat (limited to 'configure.pl')
-rwxr-xr-x | configure.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.pl b/configure.pl index 4d7912871..033e99a7f 100755 --- a/configure.pl +++ b/configure.pl @@ -1031,7 +1031,8 @@ sub load_module { my %module = %{$MODULES{$modname}}; my $works_on = sub { - my ($what, @lst) = @_; + my ($what, $lst_ref) = @_; + my @lst = @{$lst_ref}; return 1 if not @lst; # empty list -> no restrictions return 1 if $what eq 'generic'; # trust the user return in_array($what, \@lst); @@ -1041,19 +1042,19 @@ sub load_module { my $os = $$config{'os'}; croak("Module '$modname' does not run on $os") - unless(&$works_on($os, @{$module{'os'}})); + unless(&$works_on($os, $module{'os'})); my $arch = $$config{'arch'}; my $sub = $$config{'submodel'}; croak("Module '$modname' does not run on $arch/$sub") - unless(&$works_on($arch, @{$module{'arch'}}) or - &$works_on($sub, @{$module{'arch'}})); + unless(&$works_on($arch, $module{'arch'}) or + &$works_on($sub, $module{'arch'})); my $cc = $$config{'compiler'}; croak("Module '$modname' does not work with $cc") - unless(&$works_on($cc, @{$module{'cc'}})); + unless(&$works_on($cc, $module{'cc'})); my $handle_files = sub { my($lst, $func) = @_; |