ignore non-ref model/view/controller/component keys v0.09
Brian Cassidy [Wed, 24 May 2006 12:37:21 +0000 (12:37 +0000)]
bumped version

Changes
lib/Catalyst/Plugin/ConfigLoader.pm
t/20-mock_load.t
t/mockapp/mockapp.pl
t/mockapp/mockapp_local.pl

diff --git a/Changes b/Changes
index d21cc7f..fb52330 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension Catalyst::Plugin::ConfigLoader.\r
 \r
+0.09  Wed May 24 2006\r
+    - ignore non-ref model/view/controller/component keys\r
+\r
 0.08  Tue May 23 2006\r
     - added get_config_path() which extracts the path finding code\r
     - added the ability to specify a MYAPP_CONFIG ENV variable\r
index edc69d4..1788080 100644 (file)
@@ -10,7 +10,7 @@ use Module::Pluggable::Fast
     require => 1;\r
 use Data::Visitor::Callback;\r
 \r
-our $VERSION = '0.08';\r
+our $VERSION = '0.09';\r
 \r
 =head1 NAME\r
 \r
@@ -168,7 +168,11 @@ sub _fix_syntax {
         map +{\r
             prefix => $_ eq 'Component' ? '' : $_ . '::',\r
             values => delete $config->{ lc $_ } || delete $config->{ $_ }\r
-        }, qw( Component Model View Controller )\r
+        },\r
+        grep {\r
+            ref $config->{ lc $_ } || ref $config->{ $_ }\r
+        }\r
+        qw( Component Model View Controller )\r
     );\r
 \r
     foreach my $comp ( @components ) {\r
index 7f19b85..f576f47 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 5;\r
+use Test::More tests => 6;\r
 \r
 my $app = MockApp->new;\r
 $app->setup;\r
@@ -8,6 +8,7 @@ is( $app->config->{ 'Controller::Foo' }->{ foo }, 'bar' );
 is( $app->config->{ 'Controller::Foo' }->{ new }, 'key' );\r
 is( $app->config->{ 'Model::Baz' }->{ qux }, 'xyzzy' );\r
 is( $app->config->{ 'Model::Baz' }->{ another }, 'new key' );\r
+is( $app->config->{ 'view' }, 'View::TT::New' );\r
 \r
 package MockApp;\r
 \r
index 8683545..543c702 100644 (file)
@@ -1,5 +1,6 @@
 {\r
     name => 'TestApp',\r
+    view => 'View::TT',\r
     'Controller::Foo' => {\r
         foo => 'bar'\r
     },\r
index 59913d2..b4ae2a5 100644 (file)
@@ -1,4 +1,5 @@
 {\r
+    view => 'View::TT::New',\r
     'Controller::Foo' => {\r
         new => 'key'\r
     },\r