Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How can I have both short and long options with Getopt::Long?

by bigj (Monk)
on Apr 16, 2014 at 13:26 UTC ( [id://1082502]=note: print w/replies, xml ) Need Help??


in reply to How can I have both short and long options with Getopt::Long?

As long as you don't plan much special stuff, I'd usually recommend a module like App::Cmd that just takes all the usual stuff away from you. IMHO, Getopt::Long is to App::Cmd like CGI to a modern framework like Dancer or Molijious unless you plan something really special.

Greetings,
Janek Schleicher

  • Comment on Re: How can I have both short and long options with Getopt::Long?

Replies are listed 'Best First'.
Re^2: How can I have both short and long options with Getopt::Long?
by Corion (Patriarch) on Apr 16, 2014 at 13:37 UTC

    Ugh - reading the documentation of App::Cmd, it feels far more like Catalyst when compared to CGI or Dancer.

    It expects your application to have subcommands and wants you to create a subclass for every subcommand. It automagically loads plugins and hides the real structure of the program from somebody who just wants to look at how a program does its stuff.

    This approach certainly makes sense if your program is basically the gateway to a lot of subcommands, like git is the dispatcher to a large family of other programs. But most programs never reach that scale, and below that scale, the approach of App::Cmd strikes me as conceptual overkill.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-18 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found