From: Jarkko Hietaniemi Date: Mon, 1 Sep 2003 14:14:49 +0000 (+0000) Subject: From Craig Berry, following the example of the other podxxx.PL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e9de459b923410f2c7af3887364c6d4cd0df24e;p=p5sagit%2Fp5-mst-13.2.git From Craig Berry, following the example of the other podxxx.PL in relying on basename($0, '.PL') to Do The Right Thing with regard to the case of the extension, which could be either .pl or .PL on VMS depending on version-specific features. p4raw-id: //depot/perl@20983 --- diff --git a/pod/pod2usage.PL b/pod/pod2usage.PL index 1c1296a..6df5062 100644 --- a/pod/pod2usage.PL +++ b/pod/pod2usage.PL @@ -15,9 +15,8 @@ use Cwd; # This is so that make depend always knows where to find PL derivatives. $origdir = cwd; chdir(dirname($0)); -($file = basename($0)) =~ s/\.PL$//; -$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos'); # "case-forgiving" -$file =~ s/\.pl$/.com/ if ($^O eq 'VMS'); # "case-forgiving" +$file = basename($0, '.PL'); +$file .= '.com' if $^O eq 'VMS'; open OUT,">$file" or die "Can't create $file: $!"; diff --git a/pod/podselect.PL b/pod/podselect.PL index b6b8c9b..d3e204e 100644 --- a/pod/podselect.PL +++ b/pod/podselect.PL @@ -15,9 +15,8 @@ use Cwd; # This is so that make depend always knows where to find PL derivatives. $origdir = cwd; chdir(dirname($0)); -($file = basename($0)) =~ s/\.PL$//; -$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos'); # "case-forgiving" -$file =~ s/\.pl$/.com/ if ($^O eq 'VMS'); # "case-forgiving" +$file = basename($0, '.PL'); +$file .= '.com' if $^O eq 'VMS'; open OUT,">$file" or die "Can't create $file: $!";