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

Greg Sheard greg.sheard at wcn.co.uk
Tue Aug 21 14:54:14 GMT 2007


Hi,

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)__.

Hope this is okay.

Greg.

-- =

Greg Sheard <greg.sheard at wcn.co.uk>
Not speaking for WCN plc in any way.
#include "long_disclaimer.h"
-------------- next part --------------
--- ConfigLoader.pm	2007-08-21 14:14:21.750000000 +0100
+++ ConfigLoader.pm.new	2007-08-21 14:16:51.531250000 +0100
@@ -228,8 +228,8 @@
     my $v =3D Data::Visitor::Callback->new(
         plain_value =3D> sub {
             return unless defined $_;
-            s{__HOME__}{ $c->path_to( '' ) }e;
-            s{__path_to\((.+)\)__}{ $c->path_to( split( '/', $1 ) ) }e;
+            s{__HOME__}{ $c->path_to( '' ) }eg;
+            s{__path_to\((.+)\)__}{ $c->path_to( split( '/', $1 ) ) }eg;
         }
     );
     $v->visit( $c->config );


More information about the Catalyst-dev mailing list