Click here to get back home

AppConfig loading undef values into ARGCOUNT_LIST

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
AppConfig loading undef values into ARGCOUNT_LIST ksdoctor 03-22-2007
Posted by ksdoctor on March 22, 2007, 2:54 pm
Please log in for more thread options


What is the syntax for loading empty (undef) or empty strings into an
AppConfig value set to ARGCOUNT_LIST ?

I am using AppConfig 1.56

Here is a code snippet:
use AppConfig;
my $config = AppConfig->new();

$config->define("Thing=s@");
$config->file("config.txt");

print join("\n", @) . "\n";

--- config.txt---

Thing = 'one'
Thing = ''
Thing = 'three'
Thing = <undef>
Thing = undef

---

The result is only
STDERR : "Thing expects an argument at ./config.txt line 2
STDOUT :
one
<undef>
undef

I would like AppConfig to add an undef or empty string to the list
rather than ignore it.

thanks,
-K S D


Posted by Ted Zlatanov on April 3, 2007, 1:15 pm
Please log in for more thread options


On 22 Mar 2007 11:54:36 -0700 ksdoctor@fastmail.us wrote:

k> What is the syntax for loading empty (undef) or empty strings into an
k> AppConfig value set to ARGCOUNT_LIST ?
...
k> I would like AppConfig to add an undef or empty string to the list
k> rather than ignore it.

I haven't found a way to do this either. I just clear the entry
manually. A better way may be to define a "VAR IS NULL" line, which
would set VAR to undef. But I don't know who's maintaining AppConfig
these days; I asked some questions a year ago and never heard back.

Ted

Similar ThreadsPosted
XML::Generator::DBI and NULL values in columns, oh my! March 9, 2006, 2:24 pm
Spreadsheet-ParseExcel: Parsing various MS Excel file versions / grabing checkbox values? September 17, 2004, 3:11 am
AppConfig September 17, 2006, 11:37 am
AppConfig: how to reset object? October 1, 2004, 9:20 am
AppConfig failure with ARGCOUNT_LIST May 22, 2007, 10:33 am
Module install problem - AppConfig October 19, 2005, 2:04 pm
RFC: Bridge AppConfig and Config::Model November 22, 2007, 7:33 am
LWP::Simple::get returns undef for some Web pages December 26, 2004, 12:54 pm
Module loading order February 12, 2006, 11:42 pm
Loading Perl Modules faster January 21, 2005, 3:26 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap