Inline comment about difficulties which 'eval qq()' will pose
authorJames E. Keenan <jkeenan@cpan.org>
Sun, 21 Mar 2010 14:52:31 +0000 (10:52 -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 7028dd7..6798ed4 100644 (file)
@@ -768,6 +768,14 @@ EOF
       }
       elsif ($gotRETVAL || $wantRETVAL) {
         my $t = $args{optimize} && $targetable{$type_kind{$ret_type}};
+        # Although the '$var' declared in the next line is never explicitly
+        # used within this 'elsif' block, commenting it out leads to
+        # disaster, starting with the first 'eval qq' inside the 'elsif' block
+        # below.
+        # It appears that this is related to the fact that at this point the
+        # value of $t is a reference to an array whose [2] element includes
+        # '$var' as a substring:
+        # <i> <> <(IV)$var>
         my $var = 'RETVAL';
         my $type = $ret_type;