# 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: $!";
#############################################################################
use strict;
-use diagnostics;
+#use diagnostics;
=head1 NAME
=item I<file>
The pathname of a file containing pod documentation to be output in
-usage mesage format (defaults to standard input).
+usage message format (defaults to standard input).
=back
B<pod2usage> 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 then standard input is read.
B<pod2usage> invokes the B<pod2usage()> function in the B<Pod::Usage>
module. Please see L<Pod::Usage/pod2usage()>.
=head1 AUTHOR
+Please report bugs using L<http://rt.cpan.org>.
+
Brad Appleton E<lt>bradapp@enteract.comE<gt>
Based on code for B<pod2text(1)> written by
## Define options
my %options = ();
my @opt_specs = (
- "help",
- "man",
- "exit=i",
- "output=s",
- "pathlist=s",
- "verbose=i",
+ 'help',
+ 'man',
+ 'exit=i',
+ 'output=s',
+ 'pathlist=s',
+ 'verbose=i',
);
## Parse options
## Dont default to STDIN if connected to a terminal
pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
-@ARGV = ("-") unless (@ARGV > 0);
+@ARGV = ('-') unless (@ARGV);
if (@ARGV > 1) {
print STDERR "pod2usage: Too many filenames given\n\n";
pod2usage(2);
my %usage = ();
$usage{-input} = shift(@ARGV);
-$usage{-exitval} = $options{"exit"} if (defined $options{"exit"});
-$usage{-output} = $options{"output"} if (defined $options{"output"});
-$usage{-verbose} = $options{"verbose"} if (defined $options{"verbose"});
-$usage{-pathlist} = $options{"pathlist"} if (defined $options{"pathlist"});
+$usage{-exitval} = $options{'exit'} if (defined $options{'exit'});
+$usage{-output} = $options{'output'} if (defined $options{'output'});
+$usage{-verbose} = $options{'verbose'} if (defined $options{'verbose'});
+$usage{-pathlist} = $options{'pathlist'} if (defined $options{'pathlist'});
pod2usage(\%usage);