[Catalyst-dev] PATCH for Catalyst::Plugin::ConfigLoader
Brian Cassidy
brian.cassidy at nald.ca
Wed Aug 22 18:43:58 GMT 2007
Jason Kohles wrote:
> On Aug 21, 2007, at 9:05 PM, Jonathan Rockway wrote:
>
>> Sorry to hijack this thread... but it reminded me... something I've been
>> wanting for a while is:
>>
>> $c->config->{substitutions} = {
>> foo => sub { bar($_[0]) . baz($_[1]) }
>> ...
>> }
>
> sub config_substitutions {
> my $c = shift;
> for ( @_ ) {
> s{__HOME__}{ $c->path_to( '' ) }e;
> s{__path_to\((.+)\)__}{ $c->path_to( split( '/', $1 ) ) }e;
> }
> }
I've committed a patch that combines the above two options [1].
-Brian
[1] http://dev.catalystframework.org/svnweb/Catalyst/revision/?rev=6716
More information about the Catalyst-dev
mailing list