CGI-Builder-TT2
view release on metacpan or search on metacpan
lib/CGI/Builder/TT2.pm view on Meta::CPAN
);
# Template->new takes a hashref as sole arg, force scalar context
sub tt_new { Template->new( scalar($_[0]->tt_new_args) ) }
sub CGI::Builder::TT2::_::tt_print
{
my $s = shift;
Scalar::Util::weaken( $s );
$s->tt_vars( CBF => sub { return $s } );
{
# Inspect the symbol table of the Lookups package, store refs
# in tt_vars for TT to use.
no strict;
my $href = $s->tt_lookups_package() . '::';
foreach my $symbol ( keys %$href ) {
lib/CGI/Builder/TT2.pm view on Meta::CPAN
# output, but that would eat memory.
my $ok = $s->tt->process( $s->tt_template(), scalar $s->tt_vars());
}
sub CGI::Builder::TT2::_::make_wrapper
{
my $code = shift;
my $app_object = shift;
# Stop memory leak by weakening enclosed references
Scalar::Util::weaken($app_object);
return sub {
unshift @_, $app_object;
goto &{ $code };
}
}
sub page_content_check
{
( run in 0.363 second using v1.01-cache-2.11-cpan-65fba6d93b7 )