Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Use Getopt::Long even if you don't think you need to

by herveus (Parson)
on May 19, 2008 at 12:11 UTC ( #687365=note: print w/ replies, xml ) Need Help??


in reply to Use Getopt::Long even if you don't think you need to

Howdy!

I've taken to using Getopt::Euclid. It forces me to write POD in order to have arguments at all, then handles the option parsing for me.

I suppose the main message is "don't be hand-rolling your option parser", just as "don't be hand-rolling your CGI parameter parser". Some things aren't worth the effort to reinvent save as a pedagogical exercise.

yours,
Michael


Comment on Re: Use Getopt::Long even if you don't think you need to
Replies are listed 'Best First'.
Re^2: Use Getopt::Long even if you don't think you need to
by Anonymous Monk on May 19, 2008 at 16:39 UTC

    I'd fallen in love with Getopt::Euclid myself. Unfortunately many of the programs I write must be distributed via Activestate's PerlApp which does not allow the program to see anything past it's __END__ tag.

    I've fallen back to using Getopt::Long and Pod::Usage because PerlApp programs can be made to see what's in their __DATA__ section.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://687365]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-07-28 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls