The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MVC::Neaf::View::TT - Template toolkit-based view module for Neaf.

SYNOPSYS

    # Somewhere in your app
    return {
        -view => 'TT',
        -template => 'foo.tt',
        title => 'Page title',
        ....
    };

METHODS

new( %options )

%options may include:

  • preserve_dash - don't strip dashed options. Useful for debugging.

Also any UPPERCASE OPTIONS will be forwarded to the backend (i.e. Template object) w/o changes.

NOTE No input checks are made whatsoever, but this MAY change in the future.

render( \%data )

Returns a pair of values: ($content, $content_type).

Content-type defaults to text/html.

The template is determined from (1) -template in data (2) template in new(). If neither is present, empty string and "text/plain" are returned.

SEE ALSO

Template - the template toolkit used as backend.