Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

pod2man and Pod::Usage Weirdness

by skx (Parson)
on Aug 14, 2006 at 20:17 UTC ( [id://567327]=perlquestion: print w/replies, xml ) Need Help??

skx has asked for the wisdom of the Perl Monks concerning the following question:

I've written a standalone script (not a module) which contains embedded POD suitable for display by Pod::Usage.

Inside the script I have the standardish prolog which I've condensed to this sample:

#!/usr/bin/perl -w =head1 NAME foo - Do something. =cut =head1 AUTHOR me! =cut =head1 LICENSE Copyright (c) 2005-2006 by Steve Kemp. All rights reserved. ... =cut

This works nicely; pod2man creates a nice manpage for me and Pod::Usage also allows me to show the documentation to people who invoke the script with a "--manual" flag, however I have a big problem - both pod2man + Pod::Usage display the internal documentation.

Assuming I have this:

=head2 parseCommandLineArguments Parse the command line arguments this script was given. =cut sub parseCommandLineArguments { .. }

Is there a way of making sure this internal documentation is not appended to my fine manpage, or displayed by Pod::Usage?

Steve
--

Replies are listed 'Best First'.
Re: pod2man and Pod::Usage Weirdness
by Fletch (Bishop) on Aug 14, 2006 at 20:28 UTC

    You should be able to use something like =for internal-use-only to mark that the POD following isn't for general consumption. See perlpod on =for and the optional identifier that can follow =begin.

      Thanks a lot, that helped me out completely.

      For reference I've settled on:

      =begin doc Read the global configuration file, then override with per-user conf +iguration file if present. =cut sub readConfigurationFile { . .. }
      Steve
      --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://567327]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 22:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found