Skip to content
This repository
tag: 1.5024
Fetching contributors…

Cannot retrieve contributors at this time

file 76 lines (50 sloc) 1.602 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
This is Perl module Text::Xslate.

NAME

Text::Xslate - Scalable template engine for Perl5

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

If you want to install it from the repository, you must install authoring
tools.

    $ cpanm < author/requires.cpanm

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/
    repositories: http://github.com/xslate
    mailing list: http://groups.google.com/group/xslate
    irc : irc://irc.perl.org/#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.