in reply to A gentle soul to verify a Config::Simple based object?

Everything tests ok here. How about adding a test for file readability - maybe the user under which you are running can't read the config file?

die "Config file not readable!" unless -r CONFIG_FILE; # or maybe "-R" ?

update: this is the code I used for testing:

my $x = RCB::Config->_new_instance; use Data::Dumper; print Dumper( $x );

Replies are listed 'Best First'.
Re^2: A gentle soul to verify a Config::Simple based object?
by monsieur_champs (Curate) on Sep 28, 2004 at 20:50 UTC

    Thank you for this. :-)

    Just found the problem. My sections at the config file had an extra space inside '[' and ']' (I've posted the config a couple of posts before this).

    I found something that could be a documentation bug from Config::Simple: the section names (words surrounded by '[' and ']') had not all the leading and trailing spaces removed from them. Nothing is said about this in the config file. Shall I post a bug report on this?

      Hi,

      I wouldn't consider it a bug in the documentation, but an omission. In any case, please send email to the maintainer asking to have it clarified.

      Jason L. Froebe

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1