X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FConfigLoader%2FManual.pod;h=d3f6bfb00fae82398aee2ab5156f67fc3624a454;hb=ddb0ab257320d0348fcf5e6bde2ded302a46ca09;hp=74641283a816ee11d59be52f797dc01837dcc78b;hpb=587d381b43681a3529349505abcc351aec54fb01;p=catagits%2FCatalyst-Plugin-ConfigLoader.git diff --git a/lib/Catalyst/Plugin/ConfigLoader/Manual.pod b/lib/Catalyst/Plugin/ConfigLoader/Manual.pod index 7464128..d3f6bfb 100644 --- a/lib/Catalyst/Plugin/ConfigLoader/Manual.pod +++ b/lib/Catalyst/Plugin/ConfigLoader/Manual.pod @@ -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 1.07, a newly created application will use +L 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-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 with one of the supported extensions as listed +L. + +For example, A L config file is C. + +If a configuration file called C 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 local configuration file would be called +C. + +The C suffix can be changed. See +L 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, I, and I as well as a production environment can have +a C, a C, a C, and a +C. + +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 (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