summaryrefslogtreecommitdiff
path: root/pod/pod2usage.PL
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-09-01 14:14:49 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-01 14:14:49 +0000
commit0e9de459b923410f2c7af3887364c6d4cd0df24e (patch)
treece3a153916706b7f57a1fd3c8526aeb938c5ff4b /pod/pod2usage.PL
parentdd993642b6a1d34014597cd0beb8e3655151a9e7 (diff)
downloadperl-0e9de459b923410f2c7af3887364c6d4cd0df24e.tar.gz
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
Diffstat (limited to 'pod/pod2usage.PL')
-rw-r--r--pod/pod2usage.PL5
1 files changed, 2 insertions, 3 deletions
diff --git a/pod/pod2usage.PL b/pod/pod2usage.PL
index 1c1296a19f..6df506234d 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: $!";