[Catalyst-commits] r7297 - in trunk/examples/ConfigEg: . lib lib/ConfigEg/Model

jshirley at dev.catalyst.perl.org jshirley at dev.catalyst.perl.org
Fri Dec 14 18:27:03 GMT 2007


Author: jshirley
Date: 2007-12-14 18:27:03 +0000 (Fri, 14 Dec 2007)
New Revision: 7297

Modified:
   trunk/examples/ConfigEg/configeg.yml
   trunk/examples/ConfigEg/lib/ConfigEg.pm
   trunk/examples/ConfigEg/lib/ConfigEg/Model/Foo.pm
Log:
Better config samples, should probably something visible on requests.

Modified: trunk/examples/ConfigEg/configeg.yml
===================================================================
--- trunk/examples/ConfigEg/configeg.yml	2007-12-14 13:01:20 UTC (rev 7296)
+++ trunk/examples/ConfigEg/configeg.yml	2007-12-14 18:27:03 UTC (rev 7297)
@@ -1,6 +1,8 @@
 ---
 name: ConfigEg
 "Model::Foo":
-    name: "I'm a foo"
+    paper_bag:
+        pickles: 1
+        cheese: 5
 "Model::Bar":
     name: "Bar for the win"

Modified: trunk/examples/ConfigEg/lib/ConfigEg/Model/Foo.pm
===================================================================
--- trunk/examples/ConfigEg/lib/ConfigEg/Model/Foo.pm	2007-12-14 13:01:20 UTC (rev 7296)
+++ trunk/examples/ConfigEg/lib/ConfigEg/Model/Foo.pm	2007-12-14 18:27:03 UTC (rev 7297)
@@ -6,6 +6,14 @@
 
 use Data::Dump qw(dump);
 
+__PACKAGE__->config(
+    paper_bag => {
+        pickles  => 10,
+        sandwich => 1,
+        relish   => 5,
+    }
+);
+
 =head1 NAME
 
 ConfigEg::Model::Foo - Catalyst Model

Modified: trunk/examples/ConfigEg/lib/ConfigEg.pm
===================================================================
--- trunk/examples/ConfigEg/lib/ConfigEg.pm	2007-12-14 13:01:20 UTC (rev 7296)
+++ trunk/examples/ConfigEg/lib/ConfigEg.pm	2007-12-14 18:27:03 UTC (rev 7297)
@@ -26,7 +26,12 @@
 # with a external configuration file acting as an override for
 # local deployment.
 
-__PACKAGE__->config( name => 'ConfigEg' );
+__PACKAGE__->config(
+    name => 'ConfigEg',
+    'Model::Foo' => {
+        paper_bag => { pickles => 0 }
+    }
+);
 
 # Start the application
 __PACKAGE__->setup;




More information about the Catalyst-commits mailing list