elsif ($Is_VMS) {
$script = "[]show-shebang";
}
- else {
- $script = "./show-shebang";
- }
if ($^O eq 'os390' or $^O eq 'posix-bc' or $^O eq 'vmesa') { # no shebang
$headmaybe = <<EOH ;
eval 'exec ./perl -S \$0 \${1+"\$\@"}'
s/\.exe//i if $Is_Dos or $Is_os2;
s{\\}{/}g;
ok((($Is_MSWin32 || $Is_os2) ? uc($_) eq uc($s1) : $_ eq $s1), " :$_:!=:$s1: after `$perl $script`");
-
- local $ENV{PATH}= ".";
- (my $script_name = $script) =~ s/.*(show-shebang)/$1/;
- $script_name = "[]$script_name" if $Is_VMS;
- $s1 = "\$^X is $perl, \$0 is $script_name\n" if $Is_MSWin32;
- $_ = $Is_VMS ? `$^X $script_name` : `$script_name`;
- s/\.exe//i if $Is_Dos or $Is_Cygwin or $Is_os2;
- s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl
- s{is perl}{is $perl}; # for systems where $^X is only a basename
- s{\\}{/}g;
- ok((($Is_MSWin32 || $Is_os2) ? uc($_) eq uc($s1) : $_ eq $s1), " :$_:!=:$s1:");
-
- unlink($script) || die "unlink($script): $!";
+ ok unlink($script), $!;
}
# $], $^O, $^T