[Catalyst-dev] PATCH for Catalyst::Plugin::ConfigLoader

Greg Sheard greg.sheard at wcn.co.uk
Tue Aug 21 15:23:11 GMT 2007


Brian Cassidy wrote:
> Greg Sheard wrote:
>> ConfigLoader seems to use regexps that are too limited in 
>> finalize_config. This means that when passing View::TT an INCLUDE_PATH 
>> with more than one path specified (such as 
>> "__HOME__/template:__HOME__/template2"), only the first __HOME__ is 
>> substituted. Attached is a patch to handle this case, and the 
>> identical case for using __path_to(some/path)__.
> 
> Thanks! Applied, except for one small change:
> 
>> +            s{__path_to\((.+)\)__}{ $c->path_to( split( '/', $1 ) ) }eg;
> 
> is now:
> 
> s{__path_to\((.+?)\)__}{ $c->path_to( split( '/', $1 ) ) }eg;
> 
> so that the .+ is non-greedy.

Superb, cheers. The non-greedy change makes sense; I hadn't thought 
about that!

Greg.

-- 
Greg Sheard <greg.sheard at wcn.co.uk>
Not speaking for WCN plc in any way.
#include "long_disclaimer.h"



More information about the Catalyst-dev mailing list