Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Help required on Getopt::Long

by Anonymous Monk
on May 16, 2012 at 09:48 UTC ( #970788=note: print w/replies, xml ) Need Help??


in reply to Help required on Getopt::Long

This works as intended, --abc requires a string argument, so there is no way to make an exception for your case without breaking it for everyone else. I propose two work-arounds:

Mention in the documentation that --help should come as first option (circular problem is some cases).

Filter @ARGV for --help yourself before you call GetOptions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970788]
help
Chatterbox?
[choroba]: if you modify them, Perl will crash with "Modification of a read-only value attempted" for $1
[choroba]: I can't replicate the situation, but I remember it was very hard to debug

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2018-02-22 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (297 votes). Check out past polls.

    Notices?