<?xml version="1.0" encoding="windows-1252"?>
<node id="479388" title="Re: deriving usage from Getopts::Long" created="2005-07-29 08:40:19" updated="2005-08-09 13:55:50">
<type id="11">
note</type>
<author id="271524">
jimbojones</author>
<data>
<field name="doctext">
Hi,&lt;/p&gt;

Check out [The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan!] on how to use [cpan://Getopt::Long] with [cpan://Pod::Usage]. This should will cover the case of the POD (the user doc) matching the the usage sub, as the text will be derived from the same point, the POD.&lt;/p&gt;

The one thing it won't cover is the comments:
&lt;c&gt;
our $debug        = 0;    # switch on debuging
our $verbose      = 0;    # important info to STDOUT
my  $help         = 0;    # show usage
my  $force        = 0;    # run even if less than 5 since last run
&lt;/c&gt;
....&lt;/p&gt;
However, as has been discussed in multiple places in the Monastery, the choice of variable names (self-commenting) is much more important than the comments after the variable declarations. All of your variable names seem to be self-documenting, so I'm not sure it's necessary to have such detailed comments after their declarations. I would maintain that having POD, usage and self-documenting variables is the way to go here.&lt;/p&gt;

 - j&lt;/p&gt;
</field>
<field name="root_node">
479355</field>
<field name="parent_node">
479355</field>
</data>
</node>
