[Catalyst-dev] Catalyst::View::TT and PROVIDERS

Marcus Ramberg marcus at nordaaker.com
Wed Apr 30 11:53:11 BST 2008


On 28. april. 2008, at 13.09, Andreas Marienborg wrote:

> Hello
>
> I try to use Template::Provider::Encoding, to make usage of utf-8  
> encoded templates easier. The problem is that to make it work  
> nicely, I need to do something with Catalyst::View::TT. The issue is  
> that I need to tell the PROVIDER about INCLUDE_PATH, but the  
> INCLUDE_PATH gets set after all the PROVIDERS are done initializing,  
> and thus any $c->stash->{additional_template_paths} gets lost.
>
> I have created a patch (attached) that extends the View::TT  
> PROVIDERS config-key a bit, and also reorders the constructor a  
> little.
>
> The net benefit is that the PROVIDER initialization code now can  
> copy config-keys from the main config, and when it copies  
> INCLUDE_PATH, it copies the one with the coderef, which ends in  
> additional_template_paths working when I use the Encoding-provider.

Applied. Catalyst-View-TT 0.27 on it's way to CPAN.

Marcus



More information about the Catalyst-dev mailing list