Skip another file in the VERSION comparison program
[p5sagit/p5-mst-13.2.git] / pod / pod2man.PL
CommitLineData
4633a7c4 1#!/usr/local/bin/perl
2
3use Config;
4use File::Basename qw(&basename &dirname);
3b5ca523 5use Cwd;
4633a7c4 6
7# List explicitly here the variables you want Configure to
8# generate. Metaconfig only looks for shell variables, so you
9# have to mention them as if they were shell variables, not
10# %Config entries. Thus you write
11# $startperl
12# to ensure Configure will look for $Config{startperl}.
13
3b5ca523 14# This forces PL files to create target in same directory as PL file.
15# This is so that make depend always knows where to find PL derivatives.
16$origdir = cwd;
17chdir dirname($0);
18$file = basename($0, '.PL');
774d564b 19$file .= '.com' if $^O eq 'VMS';
4633a7c4 20
21open OUT,">$file" or die "Can't create $file: $!";
22
23print "Extracting $file (with variable substitutions)\n";
24
25# In this section, perl variables will be expanded during extraction.
26# You can use $Config{...} to use Configure variables.
27
28print OUT <<"!GROK!THIS!";
5f05dabc 29$Config{startperl}
30 eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
9741dab0 31 if \$running_under_some_shell;
5d94fbed 32!GROK!THIS!
33
4633a7c4 34# In the following, perl variables are not expanded during extraction.
35
36print OUT <<'!NO!SUBS!';
cb1a09d0 37
9741dab0 38# pod2man -- Convert POD data to formatted *roff input.
39#
0e4e3f6e 40# Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery <rra@stanford.edu>
9741dab0 41#
3c014959 42# This program is free software; you may redistribute it and/or modify it
9741dab0 43# under the same terms as Perl itself.
9741dab0 44
45require 5.004;
46
47use Getopt::Long qw(GetOptions);
48use Pod::Man ();
49use Pod::Usage qw(pod2usage);
50
51use strict;
46bce7d0 52
59548eca 53# Silence -w warnings.
54use vars qw($running_under_some_shell);
55
46bce7d0 56# Insert -- into @ARGV before any single dash argument to hide it from
b7ae008f 57# Getopt::Long; we want to interpret it as meaning stdin.
46bce7d0 58my $stdin;
59@ARGV = map { $_ eq '-' && !$stdin++ ? ('--', $_) : $_ } @ARGV;
9741dab0 60
3c014959 61# Parse our options, trying to retain backwards compatibility with pod2man but
62# allowing short forms as well. --lax is currently ignored.
9741dab0 63my %options;
46bce7d0 64Getopt::Long::config ('bundling_override');
4df82e26 65GetOptions (\%options, 'section|s=s', 'release|r:s', 'center|c=s',
9741dab0 66 'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s',
bf202ccd 67 'fixedbolditalic=s', 'name|n=s', 'official|o', 'quotes|q=s',
55595e83 68 'lax|l', 'help|h', 'verbose|v', 'utf8|u') or exit 1;
9741dab0 69pod2usage (0) if $options{help};
70
71# Official sets --center, but don't override things explicitly set.
72if ($options{official} && !defined $options{center}) {
73 $options{center} = 'Perl Programmers Reference Guide';
74}
cb1a09d0 75
59548eca 76# Verbose is only our flag, not a Pod::Man flag.
77my $verbose = $options{verbose};
78delete $options{verbose};
79
b4558dc4 80# This isn't a valid Pod::Man option and is only accepted for backwards
81# compatibility.
82delete $options{lax};
83
3c014959 84# Initialize and run the formatter, pulling a pair of input and output off at
85# a time.
8f202758 86my $parser = Pod::Man->new (%options);
f1745d4f 87my @files;
88do {
89 @files = splice (@ARGV, 0, 2);
59548eca 90 print " $files[1]\n" if $verbose;
f1745d4f 91 $parser->parse_from_file (@files);
92} while (@ARGV);
3c014959 93
9741dab0 94__END__
cb1a09d0 95
9741dab0 96=head1 NAME
cb1a09d0 97
9741dab0 98pod2man - Convert POD data to formatted *roff input
cb1a09d0 99
0e4e3f6e 100=for stopwords
101en em --utf8 UTF-8 overdo markup MT-LEVEL Allbery
102
9741dab0 103=head1 SYNOPSIS
cb1a09d0 104
b7ae008f 105pod2man [B<--section>=I<manext>] [B<--release>[=I<version>]]
0e4e3f6e 106 [B<--center>=I<string>] [B<--date>=I<string>] [B<--fixed>=I<font>]
107 [B<--fixedbold>=I<font>] [B<--fixeditalic>=I<font>]
108 [B<--fixedbolditalic>=I<font>] [B<--name>=I<name>] [B<--official>]
109 [B<--lax>] [B<--quotes>=I<quotes>] [B<--verbose>]
110 [I<input> [I<output>] ...]
cb1a09d0 111
46bce7d0 112pod2man B<--help>
cb1a09d0 113
9741dab0 114=head1 DESCRIPTION
cb1a09d0 115
9741dab0 116B<pod2man> is a front-end for Pod::Man, using it to generate *roff input
117from POD source. The resulting *roff code is suitable for display on a
118terminal using nroff(1), normally via man(1), or printing using troff(1).
119
120I<input> is the file to read for POD source (the POD can be embedded in
0e4e3f6e 121code). If I<input> isn't given, it defaults to C<STDIN>. I<output>, if
122given, is the file to which to write the formatted output. If I<output>
123isn't given, the formatted output is written to C<STDOUT>. Several POD
124files can be processed in the same B<pod2man> invocation (saving module
125load and compile times) by providing multiple pairs of I<input> and
126I<output> files on the command line.
9741dab0 127
128B<--section>, B<--release>, B<--center>, B<--date>, and B<--official> can be
129used to set the headers and footers to use; if not given, Pod::Man will
130assume various defaults. See below or L<Pod::Man> for details.
131
0e4e3f6e 132B<pod2man> assumes that your *roff formatters have a fixed-width font
133named C<CW>. If yours is called something else (like C<CR>), use
134B<--fixed> to specify it. This generally only matters for troff output
135for printing. Similarly, you can set the fonts used for bold, italic, and
136bold italic fixed-width output.
9741dab0 137
138Besides the obvious pod conversions, Pod::Man, and therefore pod2man also
139takes care of formatting func(), func(n), and simple variable references
140like $foo or @bar so you don't have to use code escapes for them; complex
141expressions like C<$fred{'stuff'}> will still need to be escaped, though.
142It also translates dashes that aren't used as hyphens into en dashes, makes
143long dashes--like this--into proper em dashes, fixes "paired quotes," and
144takes care of several other troff-specific tweaks. See L<Pod::Man> for
145complete information.
cb1a09d0 146
9741dab0 147=head1 OPTIONS
cb1a09d0 148
9741dab0 149=over 4
cb1a09d0 150
9741dab0 151=item B<-c> I<string>, B<--center>=I<string>
cb1a09d0 152
9741dab0 153Sets the centered page header to I<string>. The default is "User
154Contributed Perl Documentation", but also see B<--official> below.
cb1a09d0 155
9741dab0 156=item B<-d> I<string>, B<--date>=I<string>
cb1a09d0 157
9741dab0 158Set the left-hand footer string to this value. By default, the modification
159date of the input file will be used, or the current date if input comes from
0e4e3f6e 160C<STDIN>.
cb1a09d0 161
9741dab0 162=item B<--fixed>=I<font>
cb1a09d0 163
0e4e3f6e 164The fixed-width font to use for verbatim text and code. Defaults to
165C<CW>. Some systems may want C<CR> instead. Only matters for troff(1)
166output.
cb1a09d0 167
9741dab0 168=item B<--fixedbold>=I<font>
cb1a09d0 169
0e4e3f6e 170Bold version of the fixed-width font. Defaults to C<CB>. Only matters
171for troff(1) output.
cb1a09d0 172
9741dab0 173=item B<--fixeditalic>=I<font>
cb1a09d0 174
9741dab0 175Italic version of the fixed-width font (actually, something of a misnomer,
176since most fixed-width fonts only have an oblique version, not an italic
0e4e3f6e 177version). Defaults to C<CI>. Only matters for troff(1) output.
cb1a09d0 178
9741dab0 179=item B<--fixedbolditalic>=I<font>
cb1a09d0 180
9741dab0 181Bold italic (probably actually oblique) version of the fixed-width font.
0e4e3f6e 182Pod::Man doesn't assume you have this, and defaults to C<CB>. Some
183systems (such as Solaris) have this font available as C<CX>. Only matters
184for troff(1) output.
cb1a09d0 185
9741dab0 186=item B<-h>, B<--help>
cb1a09d0 187
9741dab0 188Print out usage information.
cb1a09d0 189
9741dab0 190=item B<-l>, B<--lax>
cb1a09d0 191
b4558dc4 192No longer used. B<pod2man> used to check its input for validity as a manual
193page, but this should now be done by L<podchecker(1)> instead. Accepted for
194backwards compatibility; this option no longer does anything.
cb1a09d0 195
bf202ccd 196=item B<-n> I<name>, B<--name>=I<name>
197
198Set the name of the manual page to I<name>. Without this option, the manual
199name is set to the uppercased base name of the file being converted unless
200the manual section is 3, in which case the path is parsed to see if it is a
201Perl module path. If it is, a path like C<.../lib/Pod/Man.pm> is converted
202into a name like C<Pod::Man>. This option, if given, overrides any
203automatic determination of the name.
204
205Note that this option is probably not useful when converting multiple POD
206files at once. The convention for Unix man pages for commands is for the
207man page title to be in all-uppercase even if the command isn't.
208
9741dab0 209=item B<-o>, B<--official>
cb1a09d0 210
9741dab0 211Set the default header to indicate that this page is part of the standard
212Perl release, if B<--center> is not also given.
cb1a09d0 213
ab1f1d91 214=item B<-q> I<quotes>, B<--quotes>=I<quotes>
215
216Sets the quote marks used to surround CE<lt>> text to I<quotes>. If
217I<quotes> is a single character, it is used as both the left and right
218quote; if I<quotes> is two characters, the first character is used as the
219left quote and the second as the right quoted; and if I<quotes> is four
220characters, the first two are used as the left quote and the second two as
221the right quote.
222
223I<quotes> may also be set to the special value C<none>, in which case no
224quote marks are added around CE<lt>> text (but the font is still changed for
225troff output).
226
9741dab0 227=item B<-r>, B<--release>
cb1a09d0 228
9741dab0 229Set the centered footer. By default, this is the version of Perl you run
230B<pod2man> under. Note that some system an macro sets assume that the
231centered footer will be a modification date and will prepend something like
232"Last modified: "; if this is the case, you may want to set B<--release> to
233the last modified date and B<--date> to the version number.
cb1a09d0 234
9741dab0 235=item B<-s>, B<--section>
cb1a09d0 236
9741dab0 237Set the section for the C<.TH> macro. The standard section numbering
238convention is to use 1 for user commands, 2 for system calls, 3 for
239functions, 4 for devices, 5 for file formats, 6 for games, 7 for
240miscellaneous information, and 8 for administrator commands. There is a lot
241of variation here, however; some systems (like Solaris) use 4 for file
242formats, 5 for miscellaneous information, and 7 for devices. Still others
243use 1m instead of 8, or some mix of both. About the only section numbers
244that are reliably consistent are 1, 2, and 3.
cb1a09d0 245
0e4e3f6e 246By default, section 1 will be used unless the file ends in C<.pm>, in
247which case section 3 will be selected.
cb1a09d0 248
55595e83 249=item B<-u>, B<--utf8>
250
251By default, B<pod2man> produces the most conservative possible *roff
252output to try to ensure that it will work with as many different *roff
253implementations as possible. Many *roff implementations cannot handle
254non-ASCII characters, so this means all non-ASCII characters are converted
255either to a *roff escape sequence that tries to create a properly accented
256character (at least for troff output) or to C<X>.
257
258This option says to instead output literal UTF-8 characters. If your
259*roff implementation can handle it, this is the best output format to use
260and avoids corruption of documents containing non-ASCII characters.
261However, be warned that *roff source with literal UTF-8 characters is not
262supported by many implementations and may even result in segfaults and
263other bad behavior.
264
59548eca 265=item B<-v>, B<--verbose>
266
267Print out the name of each output file as it is being generated.
268
9741dab0 269=back
cb1a09d0 270
9741dab0 271=head1 DIAGNOSTICS
cb1a09d0 272
b7ae008f 273If B<pod2man> fails with errors, see L<Pod::Man> and L<Pod::Simple> for
9741dab0 274information about what those errors might mean.
cb1a09d0 275
276=head1 EXAMPLES
277
278 pod2man program > program.1
9741dab0 279 pod2man SomeModule.pm /usr/perl/man/man3/SomeModule.3
cb1a09d0 280 pod2man --section=7 note.pod > note.7
281
9741dab0 282If you would like to print out a lot of man page continuously, you probably
283want to set the C and D registers to set contiguous page numbering and
284even/odd paging, at least on some versions of man(7).
cb1a09d0 285
9741dab0 286 troff -man -rC1 -rD1 perl.1 perldata.1 perlsyn.1 ...
cb1a09d0 287
0e4e3f6e 288To get index entries on C<STDERR>, turn on the F register, as in:
cb1a09d0 289
9741dab0 290 troff -man -rF1 perl.1
cb1a09d0 291
9741dab0 292The indexing merely outputs messages via C<.tm> for each major page,
293section, subsection, item, and any C<XE<lt>E<gt>> directives. See
294L<Pod::Man> for more details.
cb1a09d0 295
9741dab0 296=head1 BUGS
cb1a09d0 297
9741dab0 298Lots of this documentation is duplicated from L<Pod::Man>.
cb1a09d0 299
9741dab0 300=head1 NOTES
cb1a09d0 301
9741dab0 302For those not sure of the proper layout of a man page, here are some notes
303on writing a proper man page.
cb1a09d0 304
9741dab0 305The name of the program being documented is conventionally written in bold
306(using BE<lt>E<gt>) wherever it occurs, as are all program options.
307Arguments should be written in italics (IE<lt>E<gt>). Functions are
308traditionally written in italics; if you write a function as function(),
309Pod::Man will take care of this for you. Literal code or commands should
310be in CE<lt>E<gt>. References to other man pages should be in the form
311C<manpage(section)>, and Pod::Man will automatically format those
312appropriately. As an exception, it's traditional not to use this form when
313referring to module documentation; use C<LE<lt>Module::NameE<gt>> instead.
cb1a09d0 314
9741dab0 315References to other programs or functions are normally in the form of man
316page references so that cross-referencing tools can provide the user with
317links and the like. It's possible to overdo this, though, so be careful not
318to clutter your documentation with too much markup.
cb1a09d0 319
9741dab0 320The major headers should be set out using a C<=head1> directive, and are
321historically written in the rather startling ALL UPPER CASE format, although
322this is not mandatory. Minor headers may be included using C<=head2>, and
323are typically in mixed case.
cb1a09d0 324
9741dab0 325The standard sections of a manual page are:
cb1a09d0 326
9741dab0 327=over 4
cb1a09d0 328
9741dab0 329=item NAME
cb1a09d0 330
9741dab0 331Mandatory section; should be a comma-separated list of programs or functions
0e4e3f6e 332documented by this POD page, such as:
cb1a09d0 333
9741dab0 334 foo, bar - programs to do something
cb1a09d0 335
9741dab0 336Manual page indexers are often extremely picky about the format of this
337section, so don't put anything in it except this line. A single dash, and
338only a single dash, should separate the list of programs or functions from
339the description. Functions should not be qualified with C<()> or the like.
340The description should ideally fit on a single line, even if a man program
341replaces the dash with a few tabs.
cb1a09d0 342
9741dab0 343=item SYNOPSIS
cb1a09d0 344
9741dab0 345A short usage summary for programs and functions. This section is mandatory
346for section 3 pages.
cb1a09d0 347
9741dab0 348=item DESCRIPTION
cb1a09d0 349
9741dab0 350Extended description and discussion of the program or functions, or the body
351of the documentation for man pages that document something else. If
352particularly long, it's a good idea to break this up into subsections
353C<=head2> directives like:
cb1a09d0 354
9741dab0 355 =head2 Normal Usage
cb1a09d0 356
9741dab0 357 =head2 Advanced Features
cb1a09d0 358
9741dab0 359 =head2 Writing Configuration Files
cb1a09d0 360
9741dab0 361or whatever is appropriate for your documentation.
cb1a09d0 362
9741dab0 363=item OPTIONS
cb1a09d0 364
9741dab0 365Detailed description of each of the command-line options taken by the
366program. This should be separate from the description for the use of things
367like L<Pod::Usage|Pod::Usage>. This is normally presented as a list, with
368each option as a separate C<=item>. The specific option string should be
369enclosed in BE<lt>E<gt>. Any values that the option takes should be
370enclosed in IE<lt>E<gt>. For example, the section for the option
371B<--section>=I<manext> would be introduced with:
cb1a09d0 372
9741dab0 373 =item B<--section>=I<manext>
cb1a09d0 374
9741dab0 375Synonymous options (like both the short and long forms) are separated by a
376comma and a space on the same C<=item> line, or optionally listed as their
377own item with a reference to the canonical name. For example, since
378B<--section> can also be written as B<-s>, the above would be:
cb1a09d0 379
9741dab0 380 =item B<-s> I<manext>, B<--section>=I<manext>
cb1a09d0 381
9741dab0 382(Writing the short option first is arguably easier to read, since the long
383option is long enough to draw the eye to it anyway and the short option can
384otherwise get lost in visual noise.)
cb1a09d0 385
9741dab0 386=item RETURN VALUE
cb1a09d0 387
9741dab0 388What the program or function returns, if successful. This section can be
389omitted for programs whose precise exit codes aren't important, provided
390they return 0 on success as is standard. It should always be present for
391functions.
a0d0e21e 392
9741dab0 393=item ERRORS
a0d0e21e 394
46bce7d0 395Exceptions, error return codes, exit statuses, and errno settings.
396Typically used for function documentation; program documentation uses
397DIAGNOSTICS instead. The general rule of thumb is that errors printed to
0e4e3f6e 398C<STDOUT> or C<STDERR> and intended for the end user are documented in
399DIAGNOSTICS while errors passed internal to the calling program and
400intended for other programmers are documented in ERRORS. When documenting
401a function that sets errno, a full list of the possible errno values
402should be given here.
cb1a09d0 403
9741dab0 404=item DIAGNOSTICS
cb1a09d0 405
9741dab0 406All possible messages the program can print out--and what they mean. You
407may wish to follow the same documentation style as the Perl documentation;
408see perldiag(1) for more details (and look at the POD source as well).
cb1a09d0 409
9741dab0 410If applicable, please include details on what the user should do to correct
411the error; documenting an error as indicating "the input buffer is too
412small" without telling the user how to increase the size of the input buffer
413(or at least telling them that it isn't possible) aren't very useful.
cb1a09d0 414
9741dab0 415=item EXAMPLES
cb1a09d0 416
9741dab0 417Give some example uses of the program or function. Don't skimp; users often
418find this the most useful part of the documentation. The examples are
419generally given as verbatim paragraphs.
cb1a09d0 420
9741dab0 421Don't just present an example without explaining what it does. Adding a
422short paragraph saying what the example will do can increase the value of
423the example immensely.
cb1a09d0 424
9741dab0 425=item ENVIRONMENT
cb1a09d0 426
9741dab0 427Environment variables that the program cares about, normally presented as a
428list using C<=over>, C<=item>, and C<=back>. For example:
cb1a09d0 429
9741dab0 430 =over 6
a0d0e21e 431
9741dab0 432 =item HOME
bbc6b0c7 433
9741dab0 434 Used to determine the user's home directory. F<.foorc> in this
435 directory is read for configuration details, if it exists.
cb1a09d0 436
9741dab0 437 =back
cb1a09d0 438
9741dab0 439Since environment variables are normally in all uppercase, no additional
440special formatting is generally needed; they're glaring enough as it is.
a0d0e21e 441
9741dab0 442=item FILES
a0d0e21e 443
9741dab0 444All files used by the program or function, normally presented as a list, and
445what it uses them for. File names should be enclosed in FE<lt>E<gt>. It's
446particularly important to document files that will be potentially modified.
a0d0e21e 447
9741dab0 448=item CAVEATS
cb1a09d0 449
9741dab0 450Things to take special care with, sometimes called WARNINGS.
1c98b8f6 451
9741dab0 452=item BUGS
cb1a09d0 453
9741dab0 454Things that are broken or just don't work quite right.
a0d0e21e 455
9741dab0 456=item RESTRICTIONS
a0d0e21e 457
9741dab0 458Bugs you don't plan to fix. :-)
a0d0e21e 459
9741dab0 460=item NOTES
a0d0e21e 461
9741dab0 462Miscellaneous commentary.
a0d0e21e 463
9741dab0 464=item AUTHOR
a0d0e21e 465
9741dab0 466Who wrote it (use AUTHORS for multiple people). Including your current
467e-mail address (or some e-mail address to which bug reports should be sent)
468so that users have a way of contacting you is a good idea. Remember that
469program documentation tends to roam the wild for far longer than you expect
470and pick an e-mail address that's likely to last if possible.
a0d0e21e 471
b7ae008f 472=item HISTORY
473
474Programs derived from other sources sometimes have this, or you might keep
475a modification log here. If the log gets overly long or detailed,
476consider maintaining it in a separate file, though.
477
09c48e64 478=item COPYRIGHT AND LICENSE
479
480For copyright
481
3c014959 482 Copyright YEAR(s) by YOUR NAME(s)
09c48e64 483
484(No, (C) is not needed. No, "all rights reserved" is not needed.)
485
486For licensing the easiest way is to use the same licensing as Perl itself:
487
3c014959 488 This library is free software; you may redistribute it and/or modify
489 it under the same terms as Perl itself.
09c48e64 490
491This makes it easy for people to use your module with Perl. Note that
492this licensing is neither an endorsement or a requirement, you are of
493course free to choose any licensing.
494
b7ae008f 495=item SEE ALSO
a0d0e21e 496
b7ae008f 497Other man pages to check out, like man(1), man(7), makewhatis(8), or
498catman(8). Normally a simple list of man pages separated by commas, or a
499paragraph giving the name of a reference work. Man page references, if they
500use the standard C<name(section)> form, don't have to be enclosed in
501LE<lt>E<gt> (although it's recommended), but other things in this section
502probably should be when appropriate.
503
504If the package has a mailing list, include a URL or subscription
505instructions here.
506
507If the package has a web site, include a URL here.
a0d0e21e 508
9741dab0 509=back
510
511In addition, some systems use CONFORMING TO to note conformance to relevant
512standards and MT-LEVEL to note safeness for use in threaded programs or
513signal handlers. These headings are primarily useful when documenting parts
514of a C library. Documentation of object-oriented libraries or modules may
515use CONSTRUCTORS and METHODS sections for detailed documentation of the
516parts of the library and save the DESCRIPTION section for an overview; other
517large modules may use FUNCTIONS for similar reasons. Some people use
3c014959 518OVERVIEW to summarize the description if it's quite long.
9741dab0 519
520Section ordering varies, although NAME should I<always> be the first section
521(you'll break some man page systems otherwise), and NAME, SYNOPSIS,
522DESCRIPTION, and OPTIONS generally always occur first and in that order if
523present. In general, SEE ALSO, AUTHOR, and similar material should be left
524for last. Some systems also move WARNINGS and NOTES to last. The order
525given above should be reasonable for most purposes.
526
527Finally, as a general note, try not to use an excessive amount of markup.
528As documented here and in L<Pod::Man>, you can safely leave Perl variables,
529function names, man page references, and the like unadorned by markup and
530the POD translators will figure it out for you. This makes it much easier
531to later edit the documentation. Note that many existing translators
532(including this one currently) will do the wrong thing with e-mail addresses
b7ae008f 533when wrapped in LE<lt>E<gt>, so don't do that.
9741dab0 534
535For additional information that may be more accurate for your specific
b4558dc4 536system, see either L<man(5)> or L<man(7)> depending on your system manual
537section numbering conventions.
9741dab0 538
539=head1 SEE ALSO
540
b7ae008f 541L<Pod::Man>, L<Pod::Simple>, L<man(1)>, L<nroff(1)>, L<podchecker(1)>,
b4558dc4 542L<troff(1)>, L<man(7)>
9741dab0 543
b4558dc4 544The man page documenting the an macro set may be L<man(5)> instead of
545L<man(7)> on your system.
9741dab0 546
fd20da51 547The current version of this script is always available from its web site at
548L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
549Perl core distribution as of 5.6.0.
550
9741dab0 551=head1 AUTHOR
552
3c014959 553Russ Allbery <rra@stanford.edu>, based I<very> heavily on the original
554B<pod2man> by Larry Wall and Tom Christiansen. Large portions of this
555documentation, particularly the sections on the anatomy of a proper man
9741dab0 556page, are taken from the B<pod2man> documentation by Tom.
cb1a09d0 557
3c014959 558=head1 COPYRIGHT AND LICENSE
559
55595e83 560Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery
561<rra@stanford.edu>.
3c014959 562
563This program is free software; you may redistribute it and/or modify it
564under the same terms as Perl itself.
565
9741dab0 566=cut
5d94fbed 567!NO!SUBS!
46bce7d0 568#'# (cperl-mode)
4633a7c4 569
570close OUT or die "Can't close $file: $!";
571chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
572exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
3b5ca523 573chdir $origdir;