Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: How to find what options are used for Getopt::Long

by toolic (Bishop)
on Aug 03, 2012 at 12:17 UTC ( #985223=note: print w/replies, xml ) Need Help??

in reply to How to find what options are used for Getopt::Long

Another way is to store all your opt in a hash instead of individual scalars:
use warnings; use strict; use Getopt::Long; use Data::Dumper; $Data::Dumper::Sortkeys=1; my %opt; GetOptions(\%opt, qw( help cfg=s verbose silent dir=s )) or die "Mandatory options not supplied\n"; print Dumper(\%opt); __END__ -h -v $VAR1 = { 'help' => 1, 'verbose' => 1 };

Replies are listed 'Best First'.
Re^2: How to find what options are used for Getopt::Long
by doubledecker (Scribe) on Aug 07, 2012 at 11:02 UTC

    Works for me

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985223]
[ambrus]: I think the minimal implementation here is just a timer and io function, plus pushing to the @REGISTRY.
[Corion]: ambrus: Yeah, at least that's what I think I'll start with. A timer and potentially the dummy IO function that never is ready
[ambrus]: That only lets you invoke the main loop from Prima->run;, not from AnyEvent->condvar- >recv; but that shouldn't matter
[Corion]: ambrus: Details ;)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2016-12-08 12:33 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (141 votes). Check out past polls.