X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FConfig%2FAny.pm;h=189e13f3948eba8d139cc19a11da9cf9b2250984;hb=refs%2Ftags%2Fv0.26;hp=7bdf2a64a24259cd649cf686f1d6b713d0ed8f51;hpb=f9f3d682a0332cec1207764dcada85a7ff7750f0;p=p5sagit%2FConfig-Any.git diff --git a/lib/Config/Any.pm b/lib/Config/Any.pm index 7bdf2a6..189e13f 100644 --- a/lib/Config/Any.pm +++ b/lib/Config/Any.pm @@ -6,7 +6,7 @@ use warnings; use Carp; use Module::Pluggable::Object (); -our $VERSION = '0.25'; +our $VERSION = '0.26'; =head1 NAME @@ -195,15 +195,15 @@ sub _load { next unless $loader->is_supported; $supported = 1; my @configs; - my $ok = do { + my $err = do { local $@; @configs = eval { $loader->load( $filename, $loader_args{ $loader } ); }; - 1; + $@; }; # fatal error if we used extension matching - croak "Error parsing $filename: $@" if !$ok and $use_ext_lut; - next if !$ok or !@configs; + croak "Error parsing $filename: $err" if $err and $use_ext_lut; + next if $err or !@configs; # post-process config with a filter callback if ( $args->{ filter } ) {