Skip Menu |

This queue is for tickets about the Getopt-Long CPAN distribution.

Report information
The Basics
Id: 122068
Status: resolved
Priority: 0/
Queue: Getopt-Long

People
Owner: jv [...] cpan.org
Requestors: dom [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Incremental option processing broken.
As reported in <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864544> incremental option processing seems broken. Bisecting shows that that this was broken by 52e78e386fa5942bc446539aa2a4ea5bbf30dc20: Author: Johan Vromans <jvromans@squirrel.nl> Date: Mon Nov 2 09:30:15 2015 +0100 Fix bug https://rt.cpan.org/Ticket/Display.html?id=39052. This seems to be a separate problem than the the number defaulting problem reported on the Debian bug, which seems fixed as of 2.50. Thanks for your work maintaining Getopt::Long.
I've just additionally noticed that if accompanied by other arguments, incremental processing does work: $ cat /tmp/getopt-test.pl #!/usr/bin/perl use strict; use warnings; use Getopt::Long 2.33 qw(:config gnu_getopt); my $VERBOSITY = 0; my $HISTORY = 0; GetOptions( "verbose|v:+" => \$VERBOSITY, "history|h:1" => \$HISTORY ); print "VERBOSITY = $VERBOSITY\n"; print "HISTORY = $HISTORY\n"; if ($VERBOSITY) { exit 0; } else { exit 1; } dom@themisto:~/working/upstream/perl-Getopt-Long$ perl -Ilib /tmp/getopt-test.pl -vvvv VERBOSITY = 0 HISTORY = 0 dom@themisto:~/working/upstream/perl-Getopt-Long$ perl -Ilib /tmp/getopt-test.pl -vvvv -h 5 VERBOSITY = 4 HISTORY = 5
Thanks. Fixed in 2.51.