Apache-SimpleTemplate
view release on metacpan or search on metacpan
SimpleTemplate.pm view on Meta::CPAN
=head3 <%= $$inref{foo}; %>
prints the value of the CGI/form input variable 'foo'.
=head3 <% $s->header('Location','/'); $s->status(302); return; %>
ends execution of the template and redirects browser to '/'.
=head3 <% $s->content_type('text/xml'); %>
sets our content-type to 'text/xml' instead of default 'text/html';
=head3 <%: _perl_code_ %> DEPRECATED
evaluates the perl code, and the block gets replaced by the last
value returned in the perl code, or $out if defined. (included
mostly for backward compatability-- it's better to use a mixture
of <% %> and <%= %> blocks.)
(mnemonic: '<%: %>' is like a combination of '<% %>' and '<%= %>'.)
SimpleTemplate.pm view on Meta::CPAN
$s->cache() -- get or set the caching flag (0 or 1)
$s->cache(1)
$s->cascade_status() -- get or set flag for cascading status codes
$s->cascade_status(0) from included templates
=head2 other methods/functions (mostly useful in templates):
$s->content_type('text/xml') -- set our content-type to something
(must be done before any call to flush().)
$s->status(302) -- set our status to something other than 200
(must be done before any call to flush().)
$s->header($name,$value) -- add an outgoing header. (can add multiple
of the same name.)
(must be done before any call to flush().)
return -- stop running this template (within <% %>)
$s->encode($string) -- url-encode the $string.
( run in 1.984 second using v1.01-cache-2.11-cpan-524268b4103 )