Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Joost (Canon)
on Sep 23, 2007 at 22:19 UTC ( [id://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 about the Monastery: (3)
As of 2024-04-19 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found