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
      --