X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=lib%2FConfig%2FAny.pm;h=b6d0f8706df303ac1506d6a019e695c11737ead4;hp=518a9f33122f84babc2b32127da71b5bbb299c0a;hb=10a5616d22cda61842ac1d6e335c54bff73bd05e;hpb=f07b7a174347e4d35f8b80f3f68024aa974e1343 diff --git a/lib/Config/Any.pm b/lib/Config/Any.pm index 518a9f3..b6d0f87 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.19'; +our $VERSION = '0.29'; =head1 NAME @@ -194,12 +194,16 @@ sub _load { for my $loader ( @try_plugins ) { next unless $loader->is_supported; $supported = 1; - my @configs - = eval { $loader->load( $filename, $loader_args{ $loader } ); }; + my @configs; + my $err = do { + local $@; + @configs = eval { $loader->load( $filename, $loader_args{ $loader } ); }; + $@; + }; # fatal error if we used extension matching - croak "Error parsing $filename: $@" if $@ and $use_ext_lut; - next if $@ 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 } ) { @@ -310,7 +314,7 @@ Config::Any requires no configuration files or environment variables. =head1 DEPENDENCIES -L +L And at least one of the following: L