This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Reclassify approx 7 variables as either 'our' or 'my'.
authorJames E. Keenan <jkeenan@cpan.org>
Mon, 15 Mar 2010 23:07:30 +0000 (19:07 -0400)
committerSteffen Mueller <smueller@cpan.org>
Tue, 12 Jul 2011 18:53:51 +0000 (20:53 +0200)
Thanks to dagolden for diagnosis of problem with 'our' variables.

dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

index 4237b7a..5c9a4bb 100644 (file)
@@ -43,7 +43,7 @@ our (
   $thisdone, $retvaldone, $deferred, $gotRETVAL, $condnum, $cond,
   $RETVAL_code, $name_printed, $func_args, @XSStack, $ALIAS, 
 );
-#our $DoSetMagic;
+our ($DoSetMagic, $newXS, $proto, $Module_cname, $XsubAliases, $Interfaces, );
 
 sub process_file {
 
@@ -516,8 +516,8 @@ EOF
       unshift(@args, $arg0);
     }
     my $extra_args = 0;
-    @args_num = ();
-    $num_args = 0;
+    my @args_num = ();
+    my $num_args = 0;
     my $report_args = '';
     foreach my $i (0 .. $#args) {
       if ($args[$i] =~ s/\.\.\.//) {
@@ -543,7 +543,7 @@ EOF
       }
       $proto_arg[$i+1] = '$';
     }
-    $min_args = $num_args - $extra_args;
+    my $min_args = $num_args - $extra_args;
     $report_args =~ s/"/\\"/g;
     $report_args =~ s/^,\s+//;
     my @func_args = @args;
@@ -856,8 +856,8 @@ EOF
 #
 EOF
 
-    our $newXS = "newXS";
-    our $proto = "";
+    $newXS = "newXS";
+    $proto = "";
 
     # Build the prototype string for the xsub
     if ($ProtoThisXSUB) {