MATSUNO★Tokuhiro > Tiffany-1.01 > Tiffany::Template::Declare

Download:
Tiffany-1.01.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Tiffany::Template::Declare - Tiffany gateway for Template::Declare

SYNOPSIS ^

    use Tiffany;

    {
        package MyPage;
        use Template::Declare::Tags;    # defaults to 'HTML'
        use base 'Template::Declare';

        template simple => sub {
            my ( $class, $name ) = @_;
            html {
                head {} body {
                    p { "Hello, $name." };
                }
            }
        };
    }

    my $tmpl = Tiffany->load('Template::Declare', {dispatch_to => ['MyPage']});
    like $tmpl->render('simple', 'john'), qr/Hello, john./;

AUTHOR ^

Tokuhiro Matsuno

syntax highlighting: