2007-07-08
マニュアル
[% %] が標準のタグ
自分でタグを指定できる
PHP のタグにあわせると共用できたりするかも
サンプル
use strict; use Template; my $tmpl = 'hoge [% mesg %] piyo'; my $tt = Template->new() || die $Template::ERROR, "\n"; $tt->process(\$tmpl, {mesg => 'fuga'}) || die $tt->error(); #出力先は標準出力