STDERR debugging messages around the last suspected '' global variables.
authorJames E. Keenan <jkeenan@cpan.org>
Fri, 19 Mar 2010 12:15:32 +0000 (08:15 -0400)
committerSteffen Mueller <smueller@cpan.org>
Tue, 12 Jul 2011 18:53:51 +0000 (20:53 +0200)
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

index 482ae33..267cdd4 100644 (file)
@@ -47,6 +47,7 @@ our ($DoSetMagic, $newXS, $proto, $Module_cname, $XsubAliases, $Interfaces, );
 
 sub process_file {
 
+#print STDERR "ICANHAZSTDERR\n";
   # Allow for $package->process_file(%hash) in the future
   my ($pkg, %options) = @_ % 2 ? @_ : (__PACKAGE__, @_);
 
@@ -505,7 +506,18 @@ EOF
           $only_C_inlist{$_} = 1 if $out_type eq "OUTLIST";
           # $name in line below appears to a global not previously declared or
           # defined
-          push @outlist, $name if $out_type =~ /OUTLIST$/;
+#          push @outlist, $name if $out_type =~ /OUTLIST$/;
+          if ($out_type =~ /OUTLIST$/) {
+              print STDERR "matched OUTLIST, pushing \$name\n";
+              if (defined $name) {
+                  print STDERR "name: $name\n";
+                  push @outlist, $name;
+              }
+              else {
+                  print STDERR "\$name is undefined\n";
+                  push @outlist, undef;
+              }
+          }
           $in_out{$_} = $out_type;
         }
       }
@@ -1109,8 +1121,16 @@ sub INPUT_handler {
     if (s/^([^=]*)\blength\(\s*(\w+)\s*\)\s*$/$1 XSauto_length_of_$2=NO_INIT/x) {
       print "\tSTRLEN\tSTRLEN_length_of_$2;\n";
       # $name in line below is global ?
-      $lengthof{$2} = $name;
-      # $islengthof{$name} = $1;
+#      $lengthof{$2} = $name;
+      print STDERR "Inside INPUT_handler\n";
+      if (defined $name) {
+        print STDERR "name: $name\n";
+        $lengthof{$2} = $name;
+      }
+      else {
+        print STDERR "\$name is undefined\n";
+        $lengthof{$2} = undef;
+      }
       $deferred .= "\n\tXSauto_length_of_$2 = STRLEN_length_of_$2;\n";
     }