This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix freebsd/netbsd builds
[perl5.git] / utils / instmodsh.PL
index 36b8858..1a9af21 100644 (file)
@@ -18,7 +18,7 @@ chdir dirname($0);
 my $file = basename($0, '.PL');
 $file .= '.com' if $^O eq 'VMS';
 
-open OUT,">$file" or die "Can't create $file: $!";
+open OUT, '>', $file or die "Can't create $file: $!";
 
 print "Extracting $file (with variable substitutions)\n";
 
@@ -28,17 +28,17 @@ print "Extracting $file (with variable substitutions)\n";
 print OUT <<"!GROK!THIS!";
 $Config{startperl}
     eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
-       if \$running_under_some_shell;
+       if 0; # ^ Run only under a shell
 !GROK!THIS!
 
 use File::Spec;
 
 my $instmodsh
     = File::Spec->catfile(File::Spec->catdir(File::Spec->updir,
-                                            qw(ext ExtUtils-MakeMaker bin
-                                               instmodsh)));
+                                            qw(cpan ExtUtils-MakeMaker bin)),
+                         'instmodsh');
 
-if (open(INSTMODSH, $instmodsh)) {
+if (open(INSTMODSH, '<', $instmodsh)) {
     print OUT <INSTMODSH>;
     close INSTMODSH;
 } else {