Skip Menu |

This queue is for tickets about the AppConfig CPAN distribution.

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

Owner: Nobody in particular

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

Subject: CREATE setting doesn't work for command line arguments
Download (untitled) / with headers
text/plain 355b
Setting CREATE to a true value in global configuration object works fine for configuration files, but not for parsing command-line arguments. The following test script show the issue: #!/usr/bin/perl use AppConfig; my $config = AppConfig->new({ CREATE => 1 }); $config->args(); [guillaume@pomerol cameroun]$ ./ --foobar --foobar: invalid option
The following patch just fix the issue, using the same code as in
Download Args.patch
text/x-diff 367b
--- 2005-08-24 16:40:37.000000000 +0200 +++ 2005-08-24 16:40:52.000000000 +0200 @@ -101,7 +101,8 @@ } # check the variable exists - if ($state->_exists($variable)) { + if ($state->_exists($variable) + || $state->set($variable, 1)) { # see if it expects any mandatory arguments $nargs = $state->_argcount($variable);

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

Please report any issues with to