![]() |
|
No such thing as a small change | |
PerlMonks |
Re: how to write script usage sub routine for the perl file? the dynamic duo with Pod::Usageby Discipulus (Abbot) |
on Apr 03, 2017 at 07:54 UTC ( #1186789=note: print w/replies, xml ) | Need Help?? |
Hello perlanswers and welcome to the monastery and to wonderful world of Perl! There are many way to do it but I found the following particulary useful and versatile: The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan! Infact Pod::Usage can semplfy a lot such part of a program: it can shows sections of your choice of the POD embed in the program (I'm used to put the POD after the __DATA__ token), it has the ability to modify the exit value with the useful NOEXIT feature. The module can semplify a lot the help and manual commandline options; let's see it's recommendend usage:
L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|