Revision 08388ac8
Von Sven Schöling vor mehr als 14 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
841 | 841 |
'CACHE_SIZE' => 0, |
842 | 842 |
'PLUGIN_BASE' => 'SL::Template::Plugin', |
843 | 843 |
'INCLUDE_PATH' => '.:templates/webpages', |
844 |
'COMPILE_EXT' => $main::template_compile_ext, |
|
845 |
'COMPILE_DIR' => $main::template_compile_dir, |
|
844 | 846 |
}) || die; |
845 | 847 |
|
846 | 848 |
map { $additional_params->{$_} ||= $self->{$_} } keys %{ $self }; |
847 | 849 |
|
848 |
my $in = IO::File->new($file, 'r'); |
|
849 |
|
|
850 |
if (!$in) { |
|
851 |
print STDERR "Error opening template file: $!"; |
|
852 |
$main::lxdebug->leave_sub(); |
|
853 |
return ''; |
|
854 |
} |
|
855 |
|
|
856 |
my $input = join('', <$in>); |
|
857 |
$in->close(); |
|
858 |
|
|
859 | 850 |
my $output; |
860 |
if (!$template->process(\$input, $additional_params, \$output)) {
|
|
851 |
if (!$template->process($file, $additional_params, \$output)) {
|
|
861 | 852 |
print STDERR $template->error(); |
862 | 853 |
} |
863 | 854 |
|
Auch abrufbar als: Unified diff
Template Caching