|
|
| No such thing as a small change | |
| PerlMonks |
Re: Use Getopt::Long even if you don't think you need toby grinder (Bishop) |
| on May 19, 2008 at 14:25 UTC ( [id://687394]=note: print w/replies, xml ) | Need Help?? |
|
I must say was rather surprised by that remark. It's worth spelling out in full:
I couldn't believe anyone (still?) reasons this way. In the case of command-line arguments, I find this line of reasoning is unconscionable. Sooner or later, and likely sooner, there will be a second option, and at that point, if you don't refactor you have just doubled your technical debt. Similarly, Larry's remark about not using a Getopt::* library because it didn't seem worth the bother to load it in for just an opt or two to be a bad case of premature optimisation. I'm happy to cut them slack because twenty years ago, people didn't know any better :) But in this day and age there is absolutely NO reason for rolling your own command-line processing. Any more than no-one should be decoding CGI paramters manually. • another intruder with the mooring in the heart of the Perl
In Section
Meditations
|
|
||||||||||||||||||||||||||||||||||