-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong interpretation of option in GetOptions() #4687
Comments
From welker@pdvp01.tfh-berlin.deCreated by welker@tfh-berlin.deThis is a bug report for perl from welker@tfh-berlin.de, ----------------------------------------------------------------- #!/usr/bin/perl use File::Basename; $prog=basename $0; Getopt::Long::Configure ("require_order", "bundling", "auto_abbrev", "debug"); print "Option -a : $opt_a\n"; Perl Info
|
From @sciurius[Quoting Prof. Welker, on December 12 2001, 15:45, in "[ID 20011212.002] Wr"]
Let's see...
I see three options: 'l', 'a', and 'all'. Calling with "--a" means: A "--" starter, so no unbundling is done. Hence, $opt_a is set. Surprising, maybe, but it behaves as it should. If I change the documentation of the bundling setting as follows: Enabling this option will allow single-character options to be Note that, if you have options C<a>, C<l> and C<all>, and Would that prevent the surprise? -- Johan |
From [Unknown Contact. See original ticket]Prof. Welker <welker@pdvp01.tfh-berlin.de> wrote:
Johan Vromans <jvromans@squirrel.nl> wrote:
I had that figured out as: using argument sets option(s) (What actually caused me to look into the code is the (as I see it) As I workaround to the initial problem, I'd consider Getopt::Long::Configure ( "auto_abbrev", "debug", "prefix_pattern=--" Getopt::Long::Configure ("require_order", "bundling", which happens to handle --a as --all, but has to sacrifice require_order HTH, |
@sciurius - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#8044 (status was 'resolved')
Searchable as RT8044$
The text was updated successfully, but these errors were encountered: