Skip Menu |
 

This queue is for tickets about the MooseX-SimpleConfig CPAN distribution.

Report information
The Basics
Id: 57027
Status: resolved
Priority: 0/
Queue: MooseX-SimpleConfig

People
Owner: bobtfish [...] bobtfish.net
Requestors: SAMV [...] cpan.org
Cc:
AdminCc:

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



Subject: Don't fail if config files are missing
Download (untitled) / with headers
text/plain 994b
foreach my $file_tested ( @{$files_ref} ) { if ( ! exists $raw_cfany->{$file_tested} ) { die qq{Specified configfile '$file_tested' does not exist, } . q{is empty, or is not readable}; } This is a little harsh. I specify a list of possible config locations, and the program dies if any one of them is not found? Also, the order of specific-ness is effectively backwards compared to what I expected. I expected, when passing a list of config file locations, that the *first* would win, and any others would not be read. eg foreach my $file_tested ( reverse @{$files_ref} ) { if ( ! exists $raw_cfany->{$file_tested} ) { next; } my $cfany_hash = $raw_cfany->{$file_tested}; die "configfile must represent a hash structure in file: $file_tested" unless $cfany_hash && ref $cfany_hash && ref $cfany_hash eq 'HASH'; %raw_config = ( %raw_config, %{$cfany_hash} ); }
Fixed in commit 3690815, and version 0.07. Thanks for the bug report.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.