catlxom の Template::TT プラグインで、INCLUDE_PATH を指定するための patch 。
Index: plugins/Template/TT.pm
===================================================================
--- plugins/Template/TT.pm (revision 23)
+++ plugins/Template/TT.pm (working copy)
@@ -10,15 +10,15 @@
our $VERSION = '0.01';
+my $template_dir = Catlxom::Util::load_dir('template');
+my $path_root = join '/', $template_dir->dir_list;
+
__PACKAGE__->classdata->{templates} = {};
-__PACKAGE__->classdata->{tt} = Template->new;
+__PACKAGE__->classdata->{tt} = Template->new( INCLUDE_PATH => $path_root );
sub setup {
my ( $self, $c ) = @_;
- my $template_dir = Catlxom::Util::load_dir('template');
- my $path_root = join '/', $template_dir->dir_list;
-
$template_dir->recurse(
callback => sub {
my $file = shift;