Group
Extension

Matches 2

Text-Xslate ( G/GF/GFUJI/Text-Xslate-1.6002.tar.gz, GFUJI, 2012; MetaCPAN )
Text-Xslate/benchmark/json.pl ( view source; MetaCPAN )
se strict;

use Text::Xslate;
use JSON::XS;

use Benchmark qw(:all);
use Config; printf "Perl/%vd %s\n", $^V, $Config{archname};

foreach my $mod(qw(Text::Xslate JSON::XS)){
    print $mod, '/', $mod-
>VERSION, "\n";
}

my $n = shift(@ARGV) || 10;

my %vpath = (
    json => <<'TX',
<ul>
: for $books ->($item) {
    <li><:= $item.title :> (<: $item.author :>)</li>
: }
</ul>
TX
);

my $tx = Text::Xsl
->new(
    path      => \%vpath,
    cache_dir => '.xslate_cache',
    cache     => 2,
);

my $json = JSON::XS->new();

my %vars = (
     books => [(
        { title  => 'Islands in the stream',
     
Text-Xslate ( G/GF/GFUJI/Text-Xslate-1.6002.tar.gz, GFUJI, 2012; MetaCPAN )
Text-Xslate/lib/Text/Xslate/Manual/Cookbook.pod ( view source; MetaCPAN )
ipt meta characters by yourself when you put data into
C<< <script> ... </script> >> sections.

C<JSON> module is not suitable because it doesn't escape some meta
characters such as C<< "</script>" >>

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.