use Carp;
use Module::Pluggable::Object ();
-our $VERSION = '0.22';
+our $VERSION = '0.30';
=head1 NAME
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 } ) {
=head1 DEPENDENCIES
-L<Module::Pluggable|Module::Pluggable>
+L<Module::Pluggable::Object|Module::Pluggable::Object>
And at least one of the following:
L<Config::General|Config::General>