Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Trying to understand subtleties of Getopt::Long, please help

by Joost (Canon)
on Sep 23, 2007 at 22:19 UTC ( #640618=note: print w/replies, xml ) Need Help??


in reply to Trying to understand subtleties of Getopt::Long, please help

Re: case 5 and 6, AFAIK what is meant by "(not) optional" is that the values assigned to the arguments are (not) optional. In other words, the additional processing is only invoked if the arguments are specified.

IOW: @ARGV = qw(--tag --ival) would be accepted for the ":" case, but not for the "=" case. And I note you specified ":" for both Case 5 & 6.

I also find your usage of Data::Dumper incomprehensible. Since you're using Test::More, I would prefer the is_deeply method of comparing complex structure.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2023-12-02 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (13 votes). Check out past polls.

    Notices?