Skip Menu |
 

This queue is for tickets about the AppConfig CPAN distribution.

Report information
The Basics
Id: 32954
Status: open
Priority: 0/
Queue: AppConfig

People
Owner: Nobody in particular
Requestors: shawnmferris [...] yahoo.com
Cc:
AdminCc:

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



Subject: ARGCOUNT_HASH in Getopt is broken
Download (untitled) / with headers
text/plain 798b
State->set expects (variable,value) and for ARGCOUNT_HASH items, it should be ('define','verbose=loud').. but the Getopt wrapper passes ('define','verbose','loud') instead. (Getopt::Long does the work of parsing the key/value pairs) There were a few places where this could be fixed, but I choose to fix it in AppConfig::Getopt. The attached patch modifies _getopt_state to force Getopt::Long to handle ARGCOUNT_HASHes as an ARGCOUNT_LISTs instead and the expected behavior of State->set parsing key/value pairs is maintained. This way, if there was ever a need for something more powerful, say perhaps an ARGCOUNT_DEEP option, Getopt::Long wouldn't need to know how to parse it correctly, only State->set.. EG: --option foo.bar.baz=1 might be option => { foo => { bar => { baz => 1}}} ) SMF ;D
Subject: AppConfig.patch.gz
Download AppConfig.patch.gz
application/x-gzip 1004b

Message body not shown because it is not plain text.

From: shawnmferris [...] yahoo.com
Forgot to mention that the patch also includes two tests for testing ARGCOUNT_HASH functionality.
From: bogossian [...] mail.com
Download (untitled) / with headers
text/plain 270b
Hi, I got bit by this bug, but I applied your patch and everything works well now. I notice that you posted that patch almost 5 years ago, and no new version of AppConfig has appeared since them. Is there a chance to see a new version containing the fix anytime soon ?
Download (untitled) / with headers
text/plain 245b
On Tue Feb 05 19:06:17 2008, SFerris wrote: Show quoted text
> Forgot to mention that the patch also includes two tests for testing > ARGCOUNT_HASH functionality.
Hi, I applied this patch in the following PR on github: https://github.com/neilb/AppConfig/pull/7


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.