The code written out by ExtUtils::Miniperl::writemain() contained the
code
PERL_UNUSED_CONTEXT;
before the declarations
const char file[] = __FILE__;
dXSUB_SYS;
which Win32's VC++ compiler doesn't like.
print "EXTERN_C void boot_${cname} (pTHX_ CV* cv);\n";
}
- my ($tail1,$tail2) = ( $tail =~ /\A(.*\n)(\s*\}.*)\Z/s );
- print $tail1;
+ my ($tail1,$tail2,$tail3) = ( $tail =~ /\A(.*{\s*\n)(.*\n)(\s*\}.*)\Z/s );
+ print $tail1;
print "\tconst char file[] = __FILE__;\n";
print "\tdXSUB_SYS;\n" if $] > 5.002;
+ print $tail2;
foreach $_ (@exts){
my($pname) = canon('/', $_);
}
print "\t}\n";
}
- print $tail2;
+ print $tail3;
}
sub canon{