[Catalyst-commits] r8608 - in trunk/Config-Any: lib/Config t t/supported

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Mon Nov 17 14:22:16 GMT 2008


Author: bricas
Date: 2008-11-17 14:22:16 +0000 (Mon, 17 Nov 2008)
New Revision: 8608

Added:
   trunk/Config-Any/t/supported/
   trunk/Config-Any/t/supported/conf.pl
Modified:
   trunk/Config-Any/lib/Config/Any.pm
   trunk/Config-Any/t/10-branches.t
Log:
revert change to extensions() as we really want *all* extensions. fix 10-branches to try only against .pl files.

Modified: trunk/Config-Any/lib/Config/Any.pm
===================================================================
--- trunk/Config-Any/lib/Config/Any.pm	2008-11-17 13:40:15 UTC (rev 8607)
+++ trunk/Config-Any/lib/Config/Any.pm	2008-11-17 14:22:16 UTC (rev 8608)
@@ -281,7 +281,7 @@
 sub extensions {
     my $class = shift;
     my @ext
-        = map { $_->extensions } grep { $_->is_supported } $class->plugins;
+        = map { $_->extensions } $class->plugins;
     return wantarray ? @ext : \@ext;
 }
 

Modified: trunk/Config-Any/t/10-branches.t
===================================================================
--- trunk/Config-Any/t/10-branches.t	2008-11-17 13:40:15 UTC (rev 8607)
+++ trunk/Config-Any/t/10-branches.t	2008-11-17 14:22:16 UTC (rev 8608)
@@ -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 @@
     );
 }
 
-# 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 @@
 };
 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" );

Added: trunk/Config-Any/t/supported/conf.pl
===================================================================
--- trunk/Config-Any/t/supported/conf.pl	                        (rev 0)
+++ trunk/Config-Any/t/supported/conf.pl	2008-11-17 14:22:16 UTC (rev 8608)
@@ -0,0 +1,4 @@
+{   name      => 'TestApp',
+    Component => { 'Controller::Foo' => { foo => 'bar' } },
+    Model     => { 'Model::Baz' => { qux => 'xyzzy' } }
+}




More information about the Catalyst-commits mailing list