Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.35
Fixed in: 2.35_01



Subject: Configure("no_getopt_compat") does not work
Consider the following script: use Test::More qw(no_plan); #BEGIN { $ENV{POSIXLY_CORRECT}=1 } use Getopt::Long; Getopt::Long::Configure('no_getopt_compat'); @ARGV = ("+bla"); GetOptions() or die; is($ARGV[0], "+bla"); __END__ This script fails with: Unknown option: bla It makes no difference if the configuration option is set in the use-line or seperately with a Configure call. The only way to set it is by setting the POSIXLY_CORRECT env variable as early as possible. It seems that the problem lies in a wrong value for $genprefix. This variable is only set in ConfigDefault(), but not updated if $getopt_compat is unset later in Configure(). Regards, Slaven
From: JV [...] cpan.org
This should already have been fixed in 2.35_01 (available on CPAN).
Subject: Re: [rt.cpan.org #21206] Configure("no_getopt_compat") does not work
Date: 28 Aug 2006 20:51:51 +0200
To: bug-Getopt-Long [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
"Johan_Vromans via RT" <bug-Getopt-Long@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=21206 > > > This should already have been fixed in 2.35_01 (available on CPAN). >
Thanks, works fine. I only looked at CHANGES from 2.35_01 and did not find the change there, so I did not even try the developer version. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tkrevdiff - graphical display of diffs between revisions (RCS, CVS or SVN) http://ptktools.sourceforge.net/#tkrevdiff