Just another Perl shrine | |
PerlMonks |
Re: Parsing the command line: manual or module?by Velaki (Chaplain) |
on Aug 17, 2006 at 17:48 UTC ( [id://567982]=note: print w/replies, xml ) | Need Help?? |
In a word: Consistency. By adhering to a standard method of parsing the command line, you ensure that future programs will conform to accepted standards, that best practices are followed, and that existing code is maintainable by any and all resources. Additionally, using a module such as Getopt::Long is advantageous in that it enforces the behavior of various command line options, e.g. -v -f filename, which is notoriously time-consuming to code well by hand. Also, it keeps the user from having to use -h for a program, when --history could be understood more easily. In all fairness, TMTOWTDI, but why not use a well-tested, code-proven module, like Getopt::Long? I see only advantages; no disadvantages with it -- other than maybe a small learning curve. Pax vobiscum,
"Perl. There is no substitute."
In Section
Seekers of Perl Wisdom
|
|