From b3e366b9e0359e042b955aea549aca61739c611e Mon Sep 17 00:00:00 2001 From: Dmitry Lukiyanchuk Date: Wed, 2 Apr 2014 14:48:02 +0400 Subject: [PATCH] Allow template options change. --- lib/QBit/WebInterface/Controller.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/QBit/WebInterface/Controller.pm b/lib/QBit/WebInterface/Controller.pm index 862bf38..8604045 100644 --- a/lib/QBit/WebInterface/Controller.pm +++ b/lib/QBit/WebInterface/Controller.pm @@ -13,6 +13,7 @@ use Digest::MD5 qw(md5_hex); use QBit::WebInterface::Controller::Form; +our %TEMPLATE_OPTIONS; our %TEMPLATE_PRE_DEFINE; __PACKAGE__->mk_ro_accessors(qw(path attrs)); @@ -75,7 +76,7 @@ sub import { my $app_pkg = caller(); die gettext('Use only in QBit::WebInterface and QBit::Application descendant') unless $app_pkg->isa('QBit::WebInterface') - && $app_pkg->isa('QBit::Application'); + && $app_pkg->isa('QBit::Application'); my $pkg_stash = package_stash($package); @@ -354,6 +355,7 @@ sub _process_template { }, PRE_PROCESS => $opts{'pre_process'}, POST_PROCESS => $opts{'post_process'}, + %TEMPLATE_OPTIONS, ) || throw $Template::ERROR; $self->timelog->finish();