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.