Wed Mar 11 08:10:45 2009ddascalescu+perl [...] gmail.com - Ticket created
Subject:
Should return undef if get/load didn't find any config file
Right now, the returned value is an empty hash, which is slightly confusing.
Wed Mar 18 15:50:20 2009rkrimen [...] cpan.org - Taken
Wed Mar 18 15:52:23 2009rkrimen [...] cpan.org - Correspondence added
I like the fact that you can just use ->get without having to worry
about checking for undef first
I think a better way to go about it would be to add a ->loaded_from
method that will return what files the config was loaded from and in
what order. In the place where you want to do the special check you can,
otherwise you don't have to worry about it.
Wed Mar 18 15:52:24 2009The RT System itself - Status changed from 'new' to 'open'
Wed Mar 18 16:21:44 2009ddascalescu+perl [...] gmail.com - Correspondence added
From:
ddascalescu+perl [...] gmail.com
The reason I raised this bug is that I'm used to the Perl idiom
open my $file, '<', $filename or die $!;
and I expected a similar behavior from Config::JFDI:
Config::JFDI->new(name => "myapp")->get or die $!;
Wed May 20 23:26:53 2009rkrimen [...] cpan.org - Correspondence added
This feature is in 0.06, thanks for the suggestion
Let me know if you think it can be tweaked
Wed May 20 23:26:54 2009rkrimen [...] cpan.org - Status changed from 'open' to 'resolved'