summaryrefslogtreecommitdiff
path: root/pod/pod2man.PL
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-17 03:04:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-17 03:04:33 +0000
commit46bce7d0f6ca5cc2160478e0e4f69c9cd90d1803 (patch)
tree9309a637619d6cbcad3ef3aa8e05de9f431943df /pod/pod2man.PL
parent9e71ebd9886ce76c124745d8178f9f095d247318 (diff)
downloadperl-46bce7d0f6ca5cc2160478e0e4f69c9cd90d1803.tar.gz
pod{man,text} updates from podlators-1.00 (from Russ Allbery)
p4raw-id: //depot/perl@5770
Diffstat (limited to 'pod/pod2man.PL')
-rw-r--r--pod/pod2man.PL30
1 files changed, 17 insertions, 13 deletions
diff --git a/pod/pod2man.PL b/pod/pod2man.PL
index 4312e9fbe3..bf35cff4cc 100644
--- a/pod/pod2man.PL
+++ b/pod/pod2man.PL
@@ -36,14 +36,12 @@ $Config{startperl}
print OUT <<'!NO!SUBS!';
# pod2man -- Convert POD data to formatted *roff input.
+# $Id: pod2man.PL,v 1.2 2000/03/16 21:08:23 eagle Exp $
#
-# Copyright 1999 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
-#
-# The driver script for Pod::Man. This script is expected to eventually
-# replace pod2man in the standard Perl distribution.
require 5.004;
@@ -52,12 +50,17 @@ use Pod::Man ();
use Pod::Usage qw(pod2usage);
use strict;
-use vars;
+
+# Insert -- into @ARGV before any single dash argument to hide it from
+# Getopt::Long; we want to interpret it as meaning stdin (which Pod::Parser
+# does correctly).
+my $stdin;
+@ARGV = map { $_ eq '-' && !$stdin++ ? ('--', $_) : $_ } @ARGV;
# Parse our options, trying to retain backwards compatibility with pod2man
# but allowing short forms as well. --lax is currently ignored.
my %options;
-Getopt::Long::config ('bundling');
+Getopt::Long::config ('bundling_override');
GetOptions (\%options, 'section|s=s', 'release|r=s', 'center|c=s',
'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s',
'fixedbolditalic=s', 'official|o', 'lax|l', 'help|h') or exit 1;
@@ -80,13 +83,13 @@ pod2man - Convert POD data to formatted *roff input
=head1 SYNOPSIS
-pod2txt [B<--section>=I<manext>] [B<--release>=I<version>]
+pod2man [B<--section>=I<manext>] [B<--release>=I<version>]
[B<--center>=I<string>] [B<--date>=I<string>] [B<--fixed>=I<font>]
[B<--fixedbold>=I<font>] [B<--fixeditalic>=I<font>]
[B<--fixedbolditalic>=I<font>] [B<--official>] [B<--lax>] [I<input>
[I<output>]]
-pod2txt B<--help>
+pod2man B<--help>
=head1 DESCRIPTION
@@ -320,11 +323,11 @@ functions.
=item ERRORS
-Exceptions, error return codes, exit stati, and errno settings. Typically
-used for function documentation; program documentation uses DIAGNOSTICS
-instead. The general rule of thumb is that errors printed to STDOUT or
-STDERR and intended for the end user are documented in DIAGNOSTICS while
-errors passed internal to the calling program and intended for other
+Exceptions, error return codes, exit statuses, and errno settings.
+Typically used for function documentation; program documentation uses
+DIAGNOSTICS instead. The general rule of thumb is that errors printed to
+STDOUT or STDERR and intended for the end user are documented in DIAGNOSTICS
+while errors passed internal to the calling program and intended for other
programmers are documented in ERRORS. When documenting a function that sets
errno, a full list of the possible errno values should be given here.
@@ -463,6 +466,7 @@ page, are taken from the B<pod2man> documentation by Tom.
=cut
!NO!SUBS!
+#'# (cperl-mode)
close OUT or die "Can't close $file: $!";
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";