Apache-SimpleTemplate
view release on metacpan or search on metacpan
SimpleTemplate.pm view on Meta::CPAN
# $s->compile('/www/myhost.com/foo.stml');
# pass in body:
# $s->compile($template, 1);
#
sub compile {
my $s = shift;
my $template = $_[1] ? $_[0] : &load($_[0]);
if (!defined $template) { $s->{_error} .= "Not Found: $_[0]\n"; return 404; }
my $block_begin = $s->{block_begin} || $DEFAULT_BLOCK_BEGIN;
my $block_end = $s->{block_end} || $DEFAULT_BLOCK_END;
print STDERR "-- DELIM: $block_begin $block_end\n" if $s->{debug} > 2;
$block_begin =~ s/([^\w])/\\$1/g;
$block_end =~ s/([^\w])/\\$1/g;
my $eval = '';
my $precode = '';
( run in 0.572 second using v1.01-cache-2.11-cpan-39bf76dae61 )