Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Scalable template engine for Perl5
Perl XS C

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
author
benchmark
example
lib/Text
script
t
tool
xs
xt
.gitignore
.shipit
Changes
HACKING
MANIFEST.SKIP
Makefile.PL
README
xslate.h
xslate_char_trait.h

README

This is Perl module Text::Xslate.

NAME

Text::Xslate - High performance template engine in Perl

SYNOPSIS

    use Text::Xslate;

    my $tx = Text::Xslate->new();

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

    my $template = q{
    <h1><: $title :></h1>
    <ul>
    : for $books -> $book {
        <li><: $book.title :></li>
    : } # for
    </ul>
    };

    print $tx->render_string($template, \%vars);

INSTALLATION

Install cpanm (App::cpanminus) and then run the following command to install
Xslate.

    $ cpanm Text::Xslate

If you get the distribution, unpack it and build it as per the usual:

    $ tar xzf Text-Xslate-{version}.tar.gz
    $ cd Text-Xslate-{version}
    $ 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.

RESOURCE

    web site:     http://xslate.org
    distribution: http://search.cpan.org/dist/Text-Xslate
    repository:   http://github.com/gfx/p5-Text-Xslate

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.