in reply to Re: Parsing the command line: manual or module?
in thread Parsing the command line: manual or module?

Your third point is sort of an outgrowth of your second (here's hoping you don't edit that unordered list in such a way that this sentence becomes meaningless). It's a darned good point: drifting code is one of the biggest disadvantages of DRY principle violation. This is also the major opportunity for actual bugs to be introduced due to the by-hand specification of command line option parsing in every single program individually.

Plus, y'know, a good programmer should be lazy enough about stuff like this to want to do it "right" in the first place, since it's less work to use someone else's command line option parsing module than to write your own code every time.

Of course, Getopt::Std is simpler to use, so that might end up being the really lazy answer.

print substr("Just another Perl hacker", 0, -2);
- apotheon
CopyWrite Chad Perrin

  • Comment on Re^2: Parsing the command line: manual or module?