Skip Menu |

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

Report information
The Basics
Id: 25900
Status: rejected
Priority: 0/
Queue: Getopt-Long

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

Bug Information
Severity: Important
Broken in: 2.36
Fixed in: 2.36



CC: WSNYDER [...] cpan.org
Subject: Getopt-Long 2.36 breaks Verilog::Language
Let me first say, I cannot decide if Wilson uses Getopt::Long correctly. I hope the CC to him goes through and he comments on this ticket. The code that breaks is in the file vppp in WSNYDER/Verilog-Perl-2.372.tar.gz. It is being tested in t/80vppp.t. Test number 6 fails with Getopt-Long-2.36 and succeeds with Getopt-Long-2.35. This was already true for Verilog 2.371 but I did not report because I did not detect the connection to Getopt::Long until yesterday. Now I can replay: after installing G:L 2.36 this test fails and after installing 2.35 the test succeeds. So far I have verified this behaviour with bleadperl recent maintperl versions and with 5.8.8. Thanks,
From: JV [...] cpan.org
Show quoted text
> Let me first say, I cannot decide if Wilson uses Getopt::Long > correctly.
He doesn't :-(. In Getopt::Long 2.36, the first argument that is passed to a callback is no longer a scalar containing the name of the option, but an object that stringifies to the name of the option. vppp uses Getopt::Long with callbacks, and in the code for the "simple" option it has: if ( $_[0] ) { ... push options ... } Apparently, this is intended to catch the "simple" versus "nosimple" cases. However, the option value is $_[1], not $_[0] (which, as said, is the option object). So the code should read if ( $_[1] ) { ... push options ... } Why the boolification of the callback object is not true is still a mistery for me. Besides this, vppp uses Getopt::Long in a dangerous way. It uses the pass_through config option which will effectively throw away every command line argument that is not understood. This is asking for hard to find errors.
Show quoted text
>vppp uses Getopt::Long with callbacks, and in the code for the >"simple" option it has:
... Show quoted text
> if ( $_[1] ) { ... push options ... }
Indeed, I should have used $_[1] sorry about that. Show quoted text
>Besides this, vppp uses Getopt::Long in a dangerous way. It uses the >pass_through config option which will effectively throw away every >command line argument that is not understood. This is asking for hard >to find errors.
Cut and paste error. Not surprisingly I never tested --bogus flags. Thanks for noticing. I'll try to push out a new version tomorrow, I have a few other edits to collect. Feel free to move this ticket to me if you wish. BTW, thanks so much for the useful Getopt::Long and of course debugging another's bugs!
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #25900] Getopt-Long 2.36 breaks Verilog::Language
Date: Thu, 29 Mar 2007 20:53:38 +0200
To: bug-Getopt-Long [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Thu, 29 Mar 2007 13:21:22 -0400, " via RT" <bug-Getopt-Long@rt.cpan.org> said:
Show quoted text
> BTW, thanks so much for the useful Getopt::Long and of course debugging > another's bugs!
Johan++ and Wilson++. Thank you very much. -- andreas