Commits

Shlomi Fish committed ae492c3

Translate to a reference.

Comments (0)

Files changed (1)

     if ( not defined $config{LIBS} and not defined $config{INC} ) {
         print "running xml2-config...";
         eval {
-            try_libconfig( $xml2cfg, \%config, @blacklist );
+            try_libconfig( $xml2cfg, \%config, \@blacklist );
         };
 
         if ( $@ ) {
 sub try_libconfig {
     my $cfgscript = shift;
     my $config = shift;
-    my @bl = @_;
+    my $bl = shift;
 
     my $state = undef; # there are three possible states:
                        # 1     : works
     my $ver = backtick("$cfgscript --version");
     if ( defined $ver ) {
         my ( $major, $minor, $point) = $ver =~ /(\d+).(\d+)\.(\d+)/g;
-        foreach ( @bl ) {
-            $state = $_->[3];
-            last if $major <  $_->[0];
-            next if $major >  $_->[0];
-            last if $minor <  $_->[1];
-            next if $minor >  $_->[1];
-            last if $point <= $_->[2];
+        foreach my $i ( @$bl ) {
+            $state = $i->[3];
+            last if $major <  $i->[0];
+            next if $major >  $i->[0];
+            last if $minor <  $i->[1];
+            next if $minor >  $i->[1];
+            last if $point <= $i->[2];
             $state = undef;
         }