simplify
This commit is contained in:
@@ -42,18 +42,16 @@ sub _init {
|
|||||||
# take and process options :-)
|
# take and process options :-)
|
||||||
|
|
||||||
my @renderer_paths = $app ? map { abs_path($_) } grep { -d $_ } @{ $app->renderer->paths } : ();
|
my @renderer_paths = $app ? map { abs_path($_) } grep { -d $_ } @{ $app->renderer->paths } : ();
|
||||||
|
push @renderer_paths, 'templates';
|
||||||
|
|
||||||
my %config = (
|
my %config = (
|
||||||
( @renderer_paths > 0
|
INCLUDE_PATH => \@renderer_paths,
|
||||||
? (INCLUDE_PATH => [@renderer_paths, 'templates'])
|
COMPILE_EXT => '.ttc',
|
||||||
: (INCLUDE_PATH => ['templates'])
|
COMPILE_DIR => ($dir || abs_path(File::Spec->tmpdir)),
|
||||||
),
|
UNICODE => 1,
|
||||||
COMPILE_EXT => '.ttc',
|
ENCODING => 'utf-8',
|
||||||
COMPILE_DIR => ($dir || abs_path(File::Spec->tmpdir)),
|
CACHE_SIZE => 128,
|
||||||
UNICODE => 1,
|
RELATIVE => 1,
|
||||||
ENCODING => 'utf-8',
|
|
||||||
CACHE_SIZE => 128,
|
|
||||||
RELATIVE => 1,
|
|
||||||
%{$args{template_options} || {}},
|
%{$args{template_options} || {}},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user