[Catalyst-commits] r6720 - in trunk/Catalyst-Plugin-ConfigLoader: .
lib/Catalyst/Plugin
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Wed Aug 22 21:07:53 GMT 2007
Author: bricas
Date: 2007-08-22 21:07:53 +0100 (Wed, 22 Aug 2007)
New Revision: 6720
Modified:
trunk/Catalyst-Plugin-ConfigLoader/Changes
trunk/Catalyst-Plugin-ConfigLoader/Makefile.PL
trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
Log:
pass special config options to drivers
Modified: trunk/Catalyst-Plugin-ConfigLoader/Changes
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/Changes 2007-08-22 19:32:24 UTC (rev 6719)
+++ trunk/Catalyst-Plugin-ConfigLoader/Changes 2007-08-22 20:07:53 UTC (rev 6720)
@@ -5,6 +5,8 @@
(Jason Kohles)
- allow users to specify their own macros in
MyApp->config->{ substitutions } (Johnathan Rockway)
+ - pass special constructor arguments to Config::Any. Requires Config::Any
+ 0.08 (Gareth Kirwan)
[DEPRECATION NOTICE]
- the "file" and "config_local_suffix" config keys are now to be explicitly
Modified: trunk/Catalyst-Plugin-ConfigLoader/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/Makefile.PL 2007-08-22 19:32:24 UTC (rev 6719)
+++ trunk/Catalyst-Plugin-ConfigLoader/Makefile.PL 2007-08-22 20:07:53 UTC (rev 6720)
@@ -5,7 +5,7 @@
requires 'Catalyst::Runtime';
requires 'Data::Visitor' => '0.02';
-requires 'Config::Any' => '0.04';
+requires 'Config::Any' => '0.08';
requires 'Test::More';
Modified: trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm 2007-08-22 19:32:24 UTC (rev 6719)
+++ trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm 2007-08-22 20:07:53 UTC (rev 6720)
@@ -24,13 +24,14 @@
# by default myapp.* will be loaded
# you can specify a file if you'd like
- __PACKAGE__->config( file => 'config.yaml' );
+ __PACKAGE__->config( 'Plugin::ConfigLoader' => { file => 'config.yaml' } );
=head1 DESCRIPTION
This module will attempt to load find and load a configuration
file of various types. Currently it supports YAML, JSON, XML,
-INI and Perl formats.
+INI and Perl formats. Special configuration for a particular driver format can
+be stored in C<MyApp-E<gt>config-E<gt>{ 'Plugin::ConfigLoader' }-E<gt>{ driver }>.
To support the distinction between development and production environments,
this module will also attemp to load a local config (e.g. myapp_local.yaml)
@@ -50,9 +51,10 @@
my $c = shift;
my @files = $c->find_files;
my $cfg = Config::Any->load_files( {
- files => \@files,
- filter => \&_fix_syntax,
- use_ext => 1
+ files => \@files,
+ filter => \&_fix_syntax,
+ use_ext => 1,
+ driver_args => $c->config->{'Plugin::ConfigLoader'}->{driver} || {},
} );
# split the responses into normal and local cfg
More information about the Catalyst-commits
mailing list