in reply to Parsing the command line: manual or module?
I'll add another reason to advocate code reuse: collaboration.
Thousands of developers have used Getopt::Long. It has been proven, tested debuged, refined, pondered, enhanced, and applied through countless test and real-world use cases. There is no way that a home made solution will have evolved through as rigorous a refining forge as a core module. Code reuse, and in particular the use of widely popular modules, is inherently and consistantly safer than inventing your own solution to a problem that was solved ages ago.
If you've got a new problem, not addressed by a trusted and proven module, you earn the fun of inventing your own solution. But command line parameter parsing has been done before, the right way, a lot. Unless you've got a unique need not solved by existing solutions there's no need to risk making a mistake building your own approach to a problem that's already been solved.
Dave
|
|---|