Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: mprewitt [...] chelsea.net
Cc:
AdminCc:

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



Subject: ! w/abbreviation processing behavior different
This is perl, v5.6.1 built for sun4-solaris-64int. With a boolean option like "foo!" calling with --nofoo and -n used to be equivalent. That behavior has changed in 2.33 or possibly ealier (just upgrade Getopt::Long last weekend, not sure what version I previously was using.) The attached test script illustrates the problem. Not sure if this was an intentional change or not. Personally, I would never have abbreviated --nofoo as -n but I guess one of my developers thought it was a good idea.
#!/usr/bin/perl use strict; use Getopt::Long; my $opt = 1; Getoptions( 'opt' => \$opt );
Yes,this change was applied in 2.22. See CHANGES. Use perldoc Getopt::Long for an explanation and a way to still obtain the desired behaviour.