]> git.vpit.fr Git - perl/modules/Scalar-Vec-Util.git/blobdiff - Makefile.PL
Also remove PP in @ARGV when PP=0
[perl/modules/Scalar-Vec-Util.git] / Makefile.PL
index c56d8b54c77d885ecf2bf1a12cd9dd06310b55a1..ac429aaa05c6765ea0aa33b06c9d6c30229a31ce 100644 (file)
@@ -72,22 +72,21 @@ sub check_exe {
  return $exe;
 }
 
-my ($pp, $skip_arg);
+my $pp;
 for my $i (0 .. $#ARGV) {
  my $arg = $ARGV[$i];
  if ($arg =~ /^PP=(.*)/) {
   my $val = $1;
   if (do { no warnings 'numeric'; int $val } or $val =~ /^(?:y|yes)$/i) {
    print "Forcing the pure-Perl implementation from the arguments passed to Makefile.PL.\n";
-   $pp       = 1;
-   $skip_arg = $i;
+   $pp = 1;
    last;
   }
+  $ARGV[$i] = undef;
  }
 }
-if (defined $skip_arg) {
- splice @ARGV, $skip_arg, 1;
-}
+
+@ARGV = grep defined, @ARGV;
 
 my ($cc, $ld);
 unless ($pp) {