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

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://484662]
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
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (169 votes). Check out past polls.