From: Brian Cassidy Date: Mon, 17 Nov 2008 14:22:16 +0000 (+0000) Subject: revert change to extensions() as we really want *all* extensions. fix 10-branches... X-Git-Tag: v0.16^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=commitdiff_plain;h=803bbb1153db2f996a881286fdfe81eaa3c75b24 revert change to extensions() as we really want *all* extensions. fix 10-branches to try only against .pl files. --- diff --git a/lib/Config/Any.pm b/lib/Config/Any.pm index 16dcd1b..cd00963 100644 --- a/lib/Config/Any.pm +++ b/lib/Config/Any.pm @@ -281,7 +281,7 @@ parameter to those methods. sub extensions { my $class = shift; my @ext - = map { $_->extensions } grep { $_->is_supported } $class->plugins; + = map { $_->extensions } $class->plugins; return wantarray ? @ext : \@ext; } diff --git a/t/10-branches.t b/t/10-branches.t index 4ffdff5..f82303b 100644 --- a/t/10-branches.t +++ b/t/10-branches.t @@ -1,6 +1,7 @@ use strict; use warnings; +# use Test::Without::Module qw(YAML YAML::Syck Config::General XML::Simple JSON JSON::Syck Config::Tiny ); use Test::More tests => 10; use_ok( 'Config::Any' ); @@ -38,8 +39,7 @@ use_ok( 'Config::Any' ); ); } -# can only be sure that perl files will load -my @files = ( 't/conf/conf.pl' ); +my @files = glob( "t/supported/conf.*" ); ok( Config::Any->load_files( { files => \@files, use_ext => 0 } ), "use_ext 0 works" ); @@ -62,6 +62,6 @@ eval { }; ok( $@, "filter breaks" ); -my @stems = qw(t/conf/conf); +my @stems = qw(t/supported/conf); ok( Config::Any->load_stems( { stems => \@stems, use_ext => 1 } ), "load_stems with stems works" ); diff --git a/t/supported/conf.pl b/t/supported/conf.pl new file mode 100644 index 0000000..be11d59 --- /dev/null +++ b/t/supported/conf.pl @@ -0,0 +1,4 @@ +{ name => 'TestApp', + Component => { 'Controller::Foo' => { foo => 'bar' } }, + Model => { 'Model::Baz' => { qux => 'xyzzy' } } +}