aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-02-14 15:29:52 +0000
committerlloyd <[email protected]>2008-02-14 15:29:52 +0000
commit030c4f7d5ced92d6a0e83e2f62d312f262cf2f4c (patch)
treec412ba14955febed065baeb32c5636d415096319
parent862a377961b21cafb1313fdcd9e0ef785514695e (diff)
Pass the second argument of works_on as a reference, requires slightly
fewer explicit coercions.
-rwxr-xr-xconfigure.pl11
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) = @_;