This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
h2xs missing from utils/Makefile
[perl5.git] / utils / pl2pm.PL
old mode 100755 (executable)
new mode 100644 (file)
index 4e69036..55a8d2e
@@ -12,11 +12,9 @@ use File::Basename qw(&basename &dirname);
 
 # This forces PL files to create target in same directory as PL file.
 # This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
-       if ($Config{'osname'} eq 'VMS' or
-           $Config{'osname'} eq 'OS2');  # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
+$file .= '.com' if $^O eq 'VMS';
 
 open OUT,">$file" or die "Can't create $file: $!";
 
@@ -26,9 +24,9 @@ print "Extracting $file (with variable substitutions)\n";
 # You can use $Config{...} to use Configure variables.
 
 print OUT <<"!GROK!THIS!";
-$Config{'startperl'}
-    eval 'exec perl -S \$0 "\$@"'
-       if 0;
+$Config{startperl}
+    eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
+       if \$running_under_some_shell;
 !GROK!THIS!
 
 # In the following, perl variables are not expanded during extraction.
@@ -57,7 +55,7 @@ It's just a first step, but it's usually a good first step.
 
 =head1 AUTHOR
 
-Larry Wall <lwall@sems.com>
+Larry Wall <larry@wall.org>
 
 =cut