NAME

Template::Plugin::SafeInclude - TT Plugin to safe include

SYNOPSIS

    [% USE SafeInclude %]
    [% SafeInclude.inc('your_include_file.html') %]

verbose mode.

    [% USE SafeInclude(verbose => 1) %]
    [% SafeInclude.inc('not_found_file.html') %]

output.

    <!-- file error - not_found_file.html: not found -->

with params.

    [% USE SafeInclude(verbose => 1) %]
    [% SafeInclude.inc('not_found_file.html', { foo => 1, bar => 2 }) %]

DESCRIPTION

verbose option

this module don't die even if template fail in including.

use the verbose option when you want to know include failure.

    [% USE SafeInclude(verbose => 1) %]
    <!-- file error - xxx.html: not found -->

when including succeeded, nothing is output.

METHODS

inc(path, params)

safe include.

SEE ALSO

Template

AUTHOR

yuya matsumoto <yumatsumo at cpan.org>

THANKS TO

syushi matsumoto <matsumoto at cpan.org>