101
|
0 |
17 |
0 |
$self->{'engine'} ||= do {
$tt_opt{'INCLUDE_PATH'} = $self->dir($tt_opt{'INCLUDE_PATH'} || []);
my %prov_opt;
foreach $_ (@opt_provider) {
$prov_opt{$_} = $tt_opt{$_} if defined $tt_opt{$_};
};
my $prov = delete $tt_opt{'LOAD_TEMPLATES'} || ['Template::Provider'->new(\%prov_opt)];
$self->{'engine_preload'} = "Template::Provider"->new({%prov_opt, "CACHE_SIZE", undef, "STAT_TTL", 4000000000});
$prov = [$self->{'engine_preload'}, @$prov];
"Template"->new(%tt_opt, "LOAD_TEMPLATES", $prov)
} |