Credits for last fix, plus, Pod fix for the "Using a local configuration file" sectio...
[catagits/Catalyst-Plugin-ConfigLoader.git] / lib / Catalyst / Plugin / ConfigLoader / Manual.pod
index 7464128..d3f6bfb 100644 (file)
@@ -168,5 +168,58 @@ Catalyst::Plugin::ConfigLoader::Manual - Guide to using the ConfigLoader plugin
         - ''
         - AutoCommit: 1 
 
+=head2 Converting your existing config to Config::General format
+
+As of L<Catalyst::Devel> 1.07, a newly created application will use
+L<Config::General> for configuration. If you wish to convert your existing
+config, run the following one-liner (replacing MyApp with your app's name):
+
+    perl -Ilib -MMyApp -MConfig::General -e 'Config::General->new->save_file("myapp.conf", MyApp->config);'
+
+=head2 Using UTF-8 strings in a Config::General file
+
+If you have UTF-8 strings in your L<Config::General>-based config file, you
+should add the following config information to MyApp.pm:
+
+    __PACKAGE__->config( 'Plugin::ConfigLoader' => {
+        driver => {
+            'General' => { -UTF8 => 1 },
+        }
+    } );
+
+=head2 Using a local configuration file
+
+When ConfigLoader reads configurations, it starts by reading the configuration
+file for C<myapp> with one of the supported extensions as listed
+L<above|/Config Formats>.
+
+For example, A L<Config::General> config file is C<myapp.conf>.
+
+If a configuration file called C<myapp_local> exists with one of the supported
+file extensions, it will also be read, and values from that file will
+override values from the main config file.
+
+A L<Config::General> local configuration file would be called
+C<myapp_local.conf>.
+
+The C<local> suffix can be changed.  See
+L<Catalyst::Plugin::ConfigLoader/get_config_local_suffix> for the details of
+how.
+
+This is useful because it allows different people or environments to have
+different configuration files.  A project with three developers,
+I<Tom>, I<Dick>, and I<Harry> as well as a production environment can have
+a C<myapp_tom.conf>, a C<myapp_dick.conf>, a C<myapp_harry.conf>, and a
+C<myapp_production.conf>.
+
+Each developer, and the web server, would set the environment variable
+to load their proper configuration file.  All of the configurations can
+be stored properly in source control.
+
+If there is no C<myapp_local.ext> (where .ext is a supported extension), and
+the individual configuration files contain something required to start the
+application, such as the Model's data source definition, the applicaton won't
+start unless the environment variable is set properly.
+
 =cut