藤 吾郎 > Text-Xslate-Bridge-TT2-1.0002 > Text::Xslate::Bridge::TT2

Download:
Text-Xslate-Bridge-TT2-1.0002.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.0002   Source   Latest Release: Text-Xslate-Bridge-TT2-1.0003

NAME ^

Text::Xslate::Bridge::TT2 - Template-Toolkit virtual methods and filters for Xslate

VERSION ^

This document describes Text::Xslate::Bridge::TT2 version 1.0002.

SYNOPSIS ^

    use Text::Xslate;

    my $xslate = Text::Xslate->new(
        module => ['Text::Xslate::Bridge::TT2'],
    );

    print $xslate->render_string('<: "foo".length() :>'); # => 3

DESCRIPTION ^

Template-Toolkit sucks, but has a few useful features. Virtual methods and filters are such a feature. This module provides Xslate with Template-Toolkit virtual methods and filters.

CAVEAT ^

Limitation of dynamic filters

All the dynamic filters require parens (i.e. to "call" them first), even if you want to omit their arguments.

    [% FILTER repeat   # doesn't work! %]
    [% FILTER repeat() # works. %]

Unsupported features

Filters that require Template-Toolkit context object are not supported, which include eval, evaltt, perl, evalperl and redirect.

DEPENDENCIES ^

Perl 5.8.1 or later.

BUGS ^

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

SEE ALSO ^

Text::Xslate

Template

Template::Manual::VMethods

Template::Manual::Filters

AUTHOR ^

Goro Fuji (gfx) <gfuji(at)cpan.org>

LICENSE AND COPYRIGHT ^

Copyright (c) 2010, Goro Fuji (gfx). All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic for details.

syntax highlighting: