Skip to content

Instantly share code, notes, and snippets.

@kazeburo
Created April 6, 2011 02:24
Show Gist options
  • Select an option

  • Save kazeburo/905017 to your computer and use it in GitHub Desktop.

Select an option

Save kazeburo/905017 to your computer and use it in GitHub Desktop.
#/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.12.0;
use Text::Xslate;
my $templates = {
'index' => <<'EOF'
<foo>ほげ<: $bar :></foo>
EOF
};
my $tx = Text::Xslate->new(
path => [ $templates ],
);
say $Text::Xslate::VERSION;
say $tx->render('index', { bar => 'ふが' } )
__END__
$ perl /tmp/xslate.pl
1.1002
Wide character in subroutine entry at /Users/.../perls/perl-5.12.2/lib/site_perl/5.12.2/darwin-2level/Text/Xslate.pm line 458.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment