[Catalyst-commits] r8177 - in trunk/Catalyst-Plugin-ConfigLoader: . lib/Catalyst/Plugin t t/mockapp

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Tue Aug 5 03:23:12 BST 2008


Author: bricas
Date: 2008-08-05 03:23:12 +0100 (Tue, 05 Aug 2008)
New Revision: 8177

Modified:
   trunk/Catalyst-Plugin-ConfigLoader/Changes
   trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
   trunk/Catalyst-Plugin-ConfigLoader/t/20-mock_load.t
   trunk/Catalyst-Plugin-ConfigLoader/t/mockapp/mockapp.pl
Log:
add nice syntax for plugins to match models/views/controllers (ilmari)

Modified: trunk/Catalyst-Plugin-ConfigLoader/Changes
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/Changes	2008-08-05 00:32:19 UTC (rev 8176)
+++ trunk/Catalyst-Plugin-ConfigLoader/Changes	2008-08-05 02:23:12 UTC (rev 8177)
@@ -5,6 +5,7 @@
       Config::General format
     - fix up pod to explain in more detail how to pass options to each
       driver class (Sergio Salvi)
+    - add nice syntax for plugins to match models/views/controllers (ilmari)
 
 0.20  Fri May 02 2008
     - sort configs by filename for loading (RT #31498)

Modified: trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm	2008-08-05 00:32:19 UTC (rev 8176)
+++ trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm	2008-08-05 02:23:12 UTC (rev 8177)
@@ -227,7 +227,7 @@
             values => delete $config->{ lc $_ } || delete $config->{ $_ }
         },
         grep { ref $config->{ lc $_ } || ref $config->{ $_ } }
-            qw( Component Model M View V Controller C )
+            qw( Component Model M View V Controller C Plugin )
     );
 
     foreach my $comp ( @components ) {

Modified: trunk/Catalyst-Plugin-ConfigLoader/t/20-mock_load.t
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/t/20-mock_load.t	2008-08-05 00:32:19 UTC (rev 8176)
+++ trunk/Catalyst-Plugin-ConfigLoader/t/20-mock_load.t	2008-08-05 02:23:12 UTC (rev 8177)
@@ -1,6 +1,6 @@
 package MockApp;
 
-use Test::More tests => 9;
+use Test::More tests => 10;
 
 use Cwd;
 $ENV{ CATALYST_HOME } = cwd . '/t/mockapp';
@@ -21,3 +21,4 @@
 is( __PACKAGE__->config->{ 'view' },                     'View::TT::New' );
 is( __PACKAGE__->config->{ 'foo_sub' },                  'x-y' );
 is( __PACKAGE__->config->{ 'literal_macro' },            '__DATA__' );
+is( __PACKAGE__->config->{ 'Plugin::Zot' }->{ zoot },    'zooot');

Modified: trunk/Catalyst-Plugin-ConfigLoader/t/mockapp/mockapp.pl
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/t/mockapp/mockapp.pl	2008-08-05 00:32:19 UTC (rev 8176)
+++ trunk/Catalyst-Plugin-ConfigLoader/t/mockapp/mockapp.pl	2008-08-05 02:23:12 UTC (rev 8177)
@@ -4,4 +4,5 @@
     'Model::Baz'      => { qux => 'xyzzy' },
     foo_sub           => '__foo(x,y)__',
     literal_macro     => '__literal(__DATA__)__',
+    Plugin            => { Zot => { zoot => 'zooot' } },
 }




More information about the Catalyst-commits mailing list