Skip Menu |

This queue is for tickets about the AppConfig CPAN distribution.

Report information
The Basics
Id: 30528
Status: new
Priority: 0/
Queue: AppConfig

People
Owner: Nobody in particular
Requestors: christopher.mobley [...] gmail.com
Cc:
AdminCc:

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



Subject: AppConfig::File requires ACTION block to return true
Date: Tue, 6 Nov 2007 17:35:07 -0600
To: bug-AppConfig [...] rt.cpan.org
From: "Christopher Mobley" <christopher.mobley [...] gmail.com>
Download appconfig_bug
application/octet-stream 511b

Message body not shown because it is not plain text.

A possible bug and a couple of feature requests for this awesome module. I have an AppConfig setup where I can read from files or from the command line. Some of the options have an ACTION block associated with them. In one option, I had the ACTION block returning no value. This was fine if the option was set on the command line. If the option was set from inside a file, however, file parsing stopped and an error was reported. I can't see in the documentation where it specifies if ACTION blocks should return true, but it seems like we ought to see the same behavior from a file as from the command line. The attached script should demonstrate this. While I'm writing, I have a couple of feature requests. I'd like to be able to modify a variable value inside the VALIDATE block. I tried setting $_[1], but that didn't seem to work. Also, I'd like to be able to get at the AppConfig object, not just the AppConfig::State object, from inside an ACTION block. I've worked around both of these, but they would be useful tweaks. Thanks for a great module.