CatalystのTTでeval_perl Catalystの設定ファイルのyamlにEVAL_PERLを入れておくとTTでperlのコードが使える。 View::TT: INCLUDE_PATH: - 'root/templates' TEMPLATE_EXTENSION: '.tt' EVAL_PERL: 1 とかやっておくと [% PERL %] print $stash->{tags}; [% END %] みたいに書ける。 やりたいことはちょっとした加工だったので、ホントはvirtual method使いたかったのだけど、catalystのどの部分でdefine_vmethod呼べばいいのかイマイチわからなかった。 それにしてもTTでperlのコード書くのはちょっと気持ち悪い。