HTML::Template::Compiled::Classic(3pm)

HTML::Template::Compiled::Classic3pm

Provide the classic functionality like html::template

Usage

    use HTML::Template::Compiled::Classic compatible => 1;
    my $htcc = HTML::Template::Compiled::Classic->new(
        # usual parameters for HTML::Template::Compiled
    );

Overview

This class provides features which can not be used together with features from HTML::Template::Compiled. These are:

dots in TMPL_VARs

If you want to use

  <TMPL_VAR NAME="some.var.with.dots">

you cannot use the dot-feature

  <TMPL_VAR NAME="some.hash.keys">

at the same time.

Subref variables

In HTML::Template, the following works:

    my $ht = HTML::Template->new(
        scalarref => \"<TMPL_VAR foo>",
    );
    $ht->param(foo => sub { return "bar" });
    print $ht->output; # prints 'bar'

This doesn't work in HTML::Template::Compiled (in the past it did, but as of HTC version 0.70 it won't any more, sorry).

Methods

compiler_class

returns HTML::Template::Compiled::Compiler::Classic

validate_var

gets the var name (parsed out of "NAME="foo.bar"" and returns if the string is a valid var name

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7
  3. 8
  4. 9–11
  5. 12–13

From libhtml-template-compiled-perl 1.003-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.