pod update
Marcus Ramberg [Sun, 9 Mar 2008 19:00:47 +0000 (19:00 +0000)]
Changes
lib/Catalyst/Plugin/ConfigLoader.pm

diff --git a/Changes b/Changes
index 3d4ac43..f0a843e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 Revision history for Perl extension Catalyst::Plugin::ConfigLoader.
 
+    - Updated pod with new example
 0.20  Wed Feb 06 2008
     - sort configs by filename for loading (RT #31498)
 
index 930d7c1..00e6a6b 100644 (file)
@@ -26,6 +26,15 @@ Catalyst::Plugin::ConfigLoader - Load config files of various types
     # 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
@@ -58,7 +67,6 @@ sub setup {
                 || {},
         }
     );
-
     # map the array of hashrefs to a simple hash
     my %configs = map { %$_ } @$cfg;
 
@@ -125,7 +133,6 @@ sub find_files {
     else {
         @files = map { ( "$path.$_", "${path}_${suffix}.$_" ) } @extensions;
     }
-
     @files;
 }