Your message dated Sun, 18 Mar 2012 23:25:08 +0000 with message-id <[email protected]> and subject line Re: Bug#504855: Getopt::Long does not always respect no_ignore_case with pass_through has caused the Debian Bug report #504855, regarding Getopt::Long does not always respect no_ignore_case with pass_through to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 504855: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504855 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: perl Version: 5.10.0-11 The attached program illustrates the problem. The output in all recent versions up to 5.10.0-11 is below: $./GO.pl $VAR1 = { 'l' => 'foo' }; $VAR1 = { 'L' => 1 }; $VAR1 = { 'l' => 'foo' }; $VAR1 = {}; As no_ignore_case is turned on, and a -L option is not used, the 'L' => 1 from the second print statement is incorrect, and should be 'l' => 1, similarly, the fourth print statement should also produce 'l' => 1#!/usr/bin/perl use warnings; use strict; use Data::Dumper; use Getopt::Long qw(:config no_ignore_case pass_through); my %options; @ARGV = ( '-l', 'foo' ); my @args = (\%options, 'L|list-devices', 'l=s'); GetOptions (@args); print Dumper(\%options); undef %options; @ARGV = ( '-l', 'foo' ); @args = (\%options, 'L|list-devices'); GetOptions (@args); print Dumper(\%options); undef %options; @ARGV = ( '-l', 'foo' ); @args = (\%options, 'L', 'l=s'); GetOptions (@args); print Dumper(\%options); undef %options; @ARGV = ( '-l', 'foo' ); @args = (\%options, 'L'); GetOptions (@args); print Dumper(\%options);
--- End Message ---
--- Begin Message ---On Sat, Nov 06, 2010 at 09:13:04AM +0200, Niko Tyni wrote: > On Fri, Nov 07, 2008 at 06:22:34PM +0100, Jeffrey Ratcliffe wrote: > > Package: perl > > Version: 5.10.0-11 > > Sorry about the delay. > > > The attached program illustrates the problem. The output in all recent > > versions up to 5.10.0-11 is below: > > > > $./GO.pl > > $VAR1 = { > > 'l' => 'foo' > > }; > > $VAR1 = { > > 'L' => 1 > > }; > > $VAR1 = { > > 'l' => 'foo' > > }; > > $VAR1 = {}; > > > > As no_ignore_case is turned on, and a -L option is not used, the 'L' > > => 1 from the second print statement is incorrect, and should be 'l' > > => 1, similarly, the fourth print statement should also produce 'l' => > > 1 > > The L => 1 in the second case is because '-l' is an abbreviation of the > 'list-devices' alias, not because it matches the short '-L' form. > Quoting the documentation: > > In the default configuration, options names may be abbreviated to > uniqueness, case does not matter, and a single dash is sufficient, > even for long option names. > > and > > The first name is called the primary name, the other names are > called aliases. When using a hash to store options, the key will > always be the primary name. > > so '-L' => 1 seems correct to me. > > With the fourth statement the '-l' option is not allowed so all the args > end up in @ARGV (since pass_through is set.) > > I don't see a bug here. Please elaborate or let me know if I can close this. Hello Niko and Jeffrey. As more than a year has passed since this last comment, and we believe that there is no bug here, I'm going to close this now. Jeffrey, if you disagree with the conclusion, please do feel feel free to reply with elaboration. Best wishes, Dominic. -- Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
--- End Message ---

