Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Getopt::Long mystery

by Llew_Llaw_Gyffes (Scribe)
on Aug 18, 2005 at 03:12 UTC ( #484662=note: print w/replies, xml ) Need Help??


in reply to Re: Getopt::Long mystery
in thread Getopt::Long mystery

With bundling turned on options beginning with a single '-' are treated as single character options exclusively. If you want to get the auto-abbreviation behavior of long names under bundling you must start the option with two '-'s. This is explicitly stated in the documentation.

Aaaah.... That explains the behavior.  So, if one wishes to abbreviate the 'test' option to t with bundling enabled, one must somewhat counter-intuitively use '--t' instead of '-t'.  This was not clear to me from the documentation.

I see, incidentally, that this remains true even with bundling_override set, which eliminates the double-dash requirement for long options, but evidently not for abbreviations thereof....

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2020-05-29 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (169 votes). Check out past polls.

    Notices?