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=14b31a7eb5d9d4aad124bebc599b955cb2b248fa;hp=301e006e7887bdeb6ab779343155b6035fb0487d;hb=92c29326caaebb0ded4acf22cf92f4d6fb707eba;hpb=48e4a267ac83f85a46ee54c53052f8831752acac diff --git a/lib/Config/Any.pm b/lib/Config/Any.pm index 301e006..14b31a7 100644 --- a/lib/Config/Any.pm +++ b/lib/Config/Any.pm @@ -6,16 +6,12 @@ use warnings; use Carp; use Module::Pluggable::Object (); -our $VERSION = '0.09_02'; +our $VERSION = '0.12'; =head1 NAME Config::Any - Load configuration from different file formats, transparently -=head1 VERSION - -This document describes Config::Any version 0.09_02 - =head1 SYNOPSIS use Config::Any; @@ -25,7 +21,7 @@ This document describes Config::Any version 0.09_02 my $cfg = Config::Any->load_files({files => \@filepaths, ... }); for (@$cfg) { - my ($filename, $config) = each %$_; + my ($filename, $config) = %$_; $class->config($config); warn "loaded config from file: $filename"; } @@ -163,6 +159,7 @@ sub _load { } my @results; + warn $@ if $@; for my $filename ( @{ $args->{ files } } ) { @@ -183,7 +180,7 @@ sub _load { = eval { $loader->load( $filename, $loader_args{ $loader } ); }; # fatal error if we used extension matching - croak "Error parsing file: $filename" if $@ and $use_ext_lut; + croak "Error parsing $filename: $@" if $@ and $use_ext_lut; next if $@ or !@configs; # post-process config with a filter callback