我正在尝试让Catalyst
框架使用Template Toolkit
,但我遇到了问题Template::Provider
。我已将问题隔离到调用stat
. 在Template::Provider::_init
中,调用stat
正常工作,但在其他函数中调用 stat 返回 []。似乎Template::Provider
正在做一些奇怪的缓存工作,但我不太清楚是什么。有人有想法么?
编辑:更详细一点:
我正在尝试从 Catalyst 开发服务器迁移到 Apache/mod_perl。我得到一个Couldn't render template "file error - mytemplate.tt: not found"
错误。这是我的配置的调试转储:
Config
do {
my $a = {
"Action::RenderView" => {
ignore_classes => [
"DBIx::Class::ResultSource::Table",
"DBIx::Class::ResultSourceHandle",
"DateTime",
],
scrubber_func => sub { "???" },
},
"Plugin::ConfigLoader" => {},
home => "/home/myuser/pathtosite",
name => "Stream",
root => bless({
dirs => ["", "home", "myuser", "pathtosite"],
file_spec_class => undef,
volume => "",
}, "Path::Class::Dir"),
static => {
debug => 1,
dirs => [],
ignore_dirs => [],
ignore_extensions => ["tmpl", "tt", "tt2", "html", "xhtml"],
include_path => ['fix'],
mime_types => {},
mime_types_obj => bless({}, "MIME::Types"),
no_logs => 1,
},
};
$a->{static}{include_path}[0] = $a->{root};
$a;
}
几乎与某人在这里描述的完全相同的问题:http ://www.gossamer-threads.com/lists/catalyst/users/14888