|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: Showing global options while using App::Cmdby tobyink (Prior) |
| on Sep 25, 2012 at 08:29 UTC ( #995509=note: print w/ replies, xml ) | Need Help?? |
|
Personally I avoid global_opt_spec and instead use a base class for all commands. Let's say my app is called MyApp, then I'll do it like this:
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||