This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
./miniperl minimod.pl ... Can't locate strict.pm
[perl5.git] / minimod.pl
index 82760ee..fea77c0 100644 (file)
@@ -1,4 +1,5 @@
-# minimod.PL writes the contents of miniperlmain.c into the module
+#./miniperl -w
+# minimod.pl writes the contents of miniperlmain.c into the module
 # ExtUtils::Miniperl for later perusal (when the perl source is
 # deleted)
 #
 # ExtUtils::Miniperl for later perusal (when the perl source is
 # deleted)
 #
 #
 # Version 1.0, Feb 2nd 1995 by Andreas Koenig
 
 #
 # Version 1.0, Feb 2nd 1995 by Andreas Koenig
 
+BEGIN { unshift @INC, "lib" }
+
+use strict;
+
 print <<'END';
 # This File keeps the contents of miniperlmain.c.
 #
 print <<'END';
 # This File keeps the contents of miniperlmain.c.
 #
@@ -59,13 +64,13 @@ sub writemain{
        my($mname, $cname);
        ($mname = $pname) =~ s!/!::!g;
        ($cname = $pname) =~ s!/!__!g;
        my($mname, $cname);
        ($mname = $pname) =~ s!/!::!g;
        ($cname = $pname) =~ s!/!__!g;
-       print "EXTERN_C void boot_${cname} _((CV* cv));\n";
+        print "EXTERN_C void boot_${cname} (pTHX_ CV* cv);\n";
     }
 
     my ($tail1,$tail2) = ( $tail =~ /\A(.*\n)(\s*\}.*)\Z/s );
     print $tail1;
 
     }
 
     my ($tail1,$tail2) = ( $tail =~ /\A(.*\n)(\s*\}.*)\Z/s );
     print $tail1;
 
-    print "\tchar *file = __FILE__;\n";
+    print "\tconst char file[] = __FILE__;\n";
     print "\tdXSUB_SYS;\n" if $] > 5.002;
 
     foreach $_ (@exts){
     print "\tdXSUB_SYS;\n" if $] > 5.002;
 
     foreach $_ (@exts){