Created
November 12, 2014 03:07
-
-
Save nanto/27c25094ba7788da50f3 to your computer and use it in GitHub Desktop.
Text::Xslate::TTerse の undocumented な動作
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
Out of WRAPPER | |
[%- WRAPPER 'wrapper.tt' WITH arg1 = var, arg2 = 'literal' -%] | |
arg2: [% arg2 %] | |
[%- END -%] |
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
use strict; | |
use warnings; | |
use Text::Xslate; | |
my $tx = Text::Xslate->new(syntax => 'TTerse', cache => 0); | |
print $tx->render('content.tt', { var => 42 }); |
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
arg1: [% arg1 %] | |
content: [% content %] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
いずれの挙動も、今後互換性を壊す変更はしないつもりです。この挙動をテストするコードをpull-requestでいただけると、意図せず壊すこともなくなります。
具体的には、1はドキュメント化されてないだけで想定どおりの挙動、2はドキュメントの間違い、3は意図しない挙動でたまたま動いているだけですがいまの振る舞いを変更すべきでない、とそれぞれステータスは違うのですが、互換性を壊す変更をするつもりがないという点では一致しています。