X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/92c28edd459d810e3c841dc07d7846c462b368a9..8433848b134d4e61d5135fd8a70d8106025ac6a6:/pod/pod2usage.PL diff --git a/pod/pod2usage.PL b/pod/pod2usage.PL index fdaa955..a007cf6 100644 --- a/pod/pod2usage.PL +++ b/pod/pod2usage.PL @@ -2,6 +2,7 @@ use Config; use File::Basename qw(&basename &dirname); +use Cwd; # List explicitly here the variables you want Configure to # generate. Metaconfig only looks for shell variables, so you @@ -12,10 +13,10 @@ 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. +$origdir = cwd; chdir(dirname($0)); -($file = basename($0)) =~ s/\.PL$//; -$file =~ s/\.pl$// - if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving" +$file = basename($0, '.PL'); +$file .= '.com' if $^O eq 'VMS'; open OUT,">$file" or die "Can't create $file: $!"; @@ -37,10 +38,7 @@ print OUT <<'!NO!SUBS!'; ############################################################################# # pod2usage -- command to print usage messages from embedded pod docs # -# Derived from Tom Christiansen's pod2text script. -# (with extensive modifications) -# -# Copyright (c) 1996 Bradford Appleton. All rights reserved. +# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved. # This file is part of "PodParser". PodParser is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -116,7 +114,7 @@ usage mesage format (defaults to standard input). B will read the given input file looking for pod documentation and will print the corresponding usage message. -If no input file is specifed than standard input is read. +If no input file is specified than standard input is read. B invokes the B function in the B module. Please see L. @@ -127,6 +125,8 @@ L, L =head1 AUTHOR +Please report bugs using L. + Brad Appleton Ebradapp@enteract.comE Based on code for B written by @@ -177,3 +177,4 @@ pod2usage(\%usage); close OUT or die "Can't close $file: $!"; chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; +chdir $origdir;