I was having trouble finding info on how to retrieve config file 
data in my modules. And castaway suggested I send in a patch.

So here is a patch against version 0.19 of ConfigLoader.pm, saying 
it's in a hash returned by the config method.

[EMAIL PROTECTED]:~/dic$ diff -u ConfigLoader.pm.orig ConfigLoader.pm 
--- ConfigLoader.pm.orig        2008-03-08 12:58:06.000000000 +0800
+++ ConfigLoader.pm     2008-03-08 13:42:03.000000000 +0800
@@ -26,6 +26,15 @@
     # you can specify a file if you'd like
     __PACKAGE__->config( 'Plugin::ConfigLoader' => { file => 'config.yaml' } );

+  In the file, assuming it's in YAML format:
+
+    foo: bar
+
+  Accessible through the context object, or the class itself
+
+   $c->config->{foo}    # bar
+   MyApp->config->{foo} # bar
+
 =head1 DESCRIPTION

 This module will attempt to load find and load a configuration

--

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to