藤 吾郎 > Text-Xslate-3.1.0 > Text::Xslate::Bridge

Download:
Text-Xslate-3.1.0.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: Text-Xslate-3.2.4

NAME ^

Text::Xslate::Bridge - The interface base class to import methods

SYNOPSIS ^

    package SomeTemplate::Bridge::Xslate;

    use parent qw(Text::Xslate::Bridge);

    __PACKAGE__->bridge(
        nil    => \%nil_methods,
        scalar => \%scalar_methods,
        array  => \%array_methods,
        hash   => \%hash_methods,

        function => \%functions,
    );

    # in your script

    use Text::Xslate;

    my $tx = Text::Xslate->new(
        module => [
            'SomeTemplate::Bridge::Xslate'
                => [-exclude => [qw(hash::keys hash::values)]],
        ],
    );

DESCRIPTION ^

This module is the base class for adaptor classes.

INTERFACE ^

__PACKAGE__->bridge(@mapping) :Void

Install a bridge module that has method @mapping.

SEE ALSO ^

Text::Xslate

Text::Xslate::Bridge::TT2

Text::Xslate::Bridge::TT2Like

Text::Xslate::Bridge::Alloy

syntax highlighting: