Created
April 6, 2011 02:24
-
-
Save kazeburo/905017 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/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