Either this is a new idiom, or just one I've missed until now, but
use Getopt::Long;
use Pod::Usage;
...
GetOptions(
...
) or pod2usage({verbose => 1, exitval => 1});
...
=head1 SYNOPSIS
Switch a right-handed widget to the left.
% switchlr widget [--verbose]
=head1 ARGUMENTS
widget the widget to switch
=head1 OPTIONS
--verbose be verbose about it
is nifty. Really nifty.
Have you seen ybiC's tutorial in the monastery? It's a similar idiom and some extensions.
Re:Something like that
dws on 2003-04-08T17:17:19
No, I missed that tutorial entirely. Good stuff.