Skip to content
This repository

Scalable template engine for Perl5

tag: 0.1043

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 author
Octocat-spinner-32 benchmark
Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 t
Octocat-spinner-32 tool
Octocat-spinner-32 xs
Octocat-spinner-32 xt
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .shipit Update .shipit May 02, 2010
Octocat-spinner-32 Changes
Octocat-spinner-32 HACKING
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README
Octocat-spinner-32 xslate.h
README
This is Perl module Text::Xslate.

NAME

Text::Xslate - High performance template engine in Perl

SYNOPSIS

    use Text::Xslate;
    use FindBin qw($Bin);

    my $tx = Text::Xslate->new(
        # the fillowing options are optional.
        path       => ['.'],
        cache_dir  => "$ENV{HOME}/.xslate_cache",
        cache      => 1,
    );

    my %vars = (
        title => 'A list of books',
        books => [
            { title => 'Islands in the stream' },
            { title => 'Programming Perl'      },
            # ...
        ],
    );

    # given 'hello.tx':
    #<h1><: $title :></h1>
    #<ul>
    #: for $books -> $book {
    #    <li><: $book.title :></li>
    #: } # for
    #</ul>

    print $tx->render('hello.tx', \%vars);

INSTALLATION

Text::Xslate installation is straightforward. If your CPAN shell is set up,
you should just be able to do

    $ cpan Text::Xslate

Download it, unpack it, then build it as per the usual:

    $ perl Makefile.PL
    $ make && make test

Then install it:

    $ make install

DOCUMENTATION

Text::Xslate documentation is available as in POD. So you can do:

    $ perldoc Text::Xslate

to read the documentation online with your favorite pager.

LICENSE AND COPYRIGHT

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

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Something went wrong with that request. Please try again.