in reply to How to access HTML::Template methos "config" from CGI::Application

Can't I put the "config" call in other place so that its effect is already there when I call load_tmpl() in the first run mode?

Make your own method that calls load_tmpl with the defaults your want

You don't even have to use hook mechanism

sub lt { shift()->load_tmpl( @_, utf8 => 1 ); }

Or use the CGI::Application::Plugin::AnyTemplate plugin as it supports configuration of template drivers

  • Comment on Re: How to access HTML::Template method "config" from CGI::Application
  • Download Code

Replies are listed 'Best First'.
Re^2: How to access HTML::Template method "config" from CGI::Application
by mpolito1969 (Initiate) on Sep 26, 2016 at 14:38 UTC

    This is a nice workaround, thank you for your answer.

    Ciao,
    Max