X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fpod2man.PL;h=bf35cff4ccbd2bc343ae34e20c96c401c306cba0;hb=49b8b560b023159cf65bbcf3068dc24e8091bc05;hp=4312e9fbe320ace9b4434aeef87b413db095f0d3;hpb=146174a91a192983720a158796dc066226ad0e55;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 4312e9f..bf35cff 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 +# Copyright 1999, 2000 by Russ Allbery # # 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] [B<--release>=I] +pod2man [B<--section>=I] [B<--release>=I] [B<--center>=I] [B<--date>=I] [B<--fixed>=I] [B<--fixedbold>=I] [B<--fixeditalic>=I] [B<--fixedbolditalic>=I] [B<--official>] [B<--lax>] [I [I]] -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 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";