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=15005fcb5c5066a063f8f712aed3a18e34ce251d;hp=1f172bc6c546deafc3f7aa92fe7489952ba4eb8f;hb=589fae53502c74de0757717ea5171725ea3a93e9;hpb=c84f1613b60ec2bd2df1a88e6618f36246c24c4b diff --git a/lib/Config/Any.pm b/lib/Config/Any.pm index 1f172bc..15005fc 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_01'; +our $VERSION = '0.11'; =head1 NAME Config::Any - Load configuration from different file formats, transparently -=head1 VERSION - -This document describes Config::Any version 0.09 - =head1 SYNOPSIS use Config::Any; @@ -25,7 +21,7 @@ This document describes Config::Any version 0.09 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"; } @@ -141,8 +137,7 @@ sub _load { } # figure out what plugins we're using - my @plugins = grep { $_->is_supported } - ( $force ? @{ $args->{ force_plugins } } : $class->plugins ); + my @plugins = $force ? @{ $args->{ force_plugins } } : $class->plugins; # map extensions if we have to my ( %extension_lut, $extension_re ); @@ -179,6 +174,7 @@ sub _load { } for my $loader ( @try_plugins ) { + next unless $loader->is_supported; my @configs = eval { $loader->load( $filename, $loader_args{ $loader } ); };