in reply to Re: GetOpt Organization
in thread GetOpt Organization
The function pod2usage supports -exitval => 'NOEXIT' (ie normally it exits the program unless you specify it to not do) useful if you started the program without a console, like in a Tk application as Tk Tartaglia's triangle fun - Pascal's triangle fun.use Getopt::Long; use Pod::Usage; unless ( GetOptions ( "color=s"=>\$par_color, "help" => \$par_help, ) ) {pod2usage(-verbose => 1,-exitval => 'NOEXIT'); &wait_for_in +put; exit;} if (defined $par_help){pod2usage(-verbose => 1,-exitval => 'NOEXIT'); +&wait_for_input; exit;}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: GetOpt Organization (error check)
by Anonymous Monk on Mar 10, 2015 at 11:29 UTC | |
by Discipulus (Canon) on Mar 10, 2015 at 11:42 UTC | |
Re^3: GetOpt Organization (error check)
by karlgoethebier (Abbot) on Mar 10, 2015 at 10:29 UTC | |
by Discipulus (Canon) on Mar 10, 2015 at 11:10 UTC | |
by karlgoethebier (Abbot) on Mar 10, 2015 at 11:20 UTC | |
by Discipulus (Canon) on Mar 10, 2015 at 11:39 UTC |