Skip Menu |

This queue is for tickets about the Config-Any CPAN distribution.

Report information
The Basics
Id: 32995
Status: resolved
Priority: 0/
Queue: Config-Any

People
Owner: bricas [...] cpan.org
Requestors: peter [...] dragonstaff.com
Cc:
AdminCc:

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



An invalid Perl configuration file causes an error on eval in Config::Any::Perl::load(). However, when running within a test harness like Test::Builder, this error is not fatal and an undef config is returned back to Config::Any. load() should call die in this case and then Config::Any handles it properly. A patch follows: --- Perl.pm 2008-02-07 17:53:23.000000000 +0000 +++ /usr/lib/perl5/site_perl/5.8.5/Config/Any/Perl.pm 2008-02-07 17:52:47.000000000 +0000 @@ -48,6 +48,7 @@ unless ( $content = $cache{ $file } ) { $content = eval { require $file }; + die "eval failed: $file: $@" if $@; $cache{ $file } = $content; }
I've checked in a fix, which basically just removes the eval { }, as revision 7438 [1]. Please try it out. -Brian [1] http://dev.catalyst.perl.org/svnweb/Catalyst/revision/?rev=7438
From: peterdragon [...] users.sourceforge.net
On Thu Feb 07 18:03:43 2008, BRICAS wrote: Show quoted text
> I've checked in a fix, which basically just removes the eval { }, as > revision 7438 [1]. Please try it out. > > -Brian > > [1] http://dev.catalyst.perl.org/svnweb/Catalyst/revision/?rev=7438
Brian, that works fine for me. Removing the eval was a lot smarter than adding an extra die ;) Regards, Peter
Version 0.12 now heading to CPAN.