执行催化剂服务器脚本时遇到以下问题。
Couldn't load class (Catalyst::Script::Server) because: "ensure_class_loaded" is not exported by the Catalyst::Utils module
Can't continue after import errors at /opt/madhan/lib/perl5/Catalyst/ScriptRole.pm line 7.
BEGIN failed--compilation aborted at /opt/madhan/lib/perl5/Catalyst/ScriptRole.pm line 7.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/Module/Runtime.pm line 313.
Compilation failed in require at /opt/madhan/lib/perl5/Catalyst/ScriptRunner.pm line 13.
Catalyst::ScriptRunner::find_script_class("Catalyst::ScriptRunner", "testsite", "Server") called at /opt/madhan/lib/perl5/Catalyst/ScriptRunner.pm line 42
Catalyst::ScriptRunner::run("Catalyst::ScriptRunner", "testsite", "Server") called at /opt/madhan/testsite/script/testsite_server.pl line 8
perl 5.8.8是否支持Catalyst MVC?
答案 0 :(得分:6)
这是Catalyst中的一个错误。在Catalyst :: ScriptRole中有一些类型检查代码(自2012年以来!)完全被破坏,但破坏只在特定情况下可见 - 即,如果脚本向Catalyst :: ScriptRole提供了loader_class
如果系统有一个非常旧版本的UNIVERSAL.pm,例如perl 5.8附带的版本,那么它还不是一个已加载的类(可能没有人有),或。这是你遇到的第二种情况。
我已经将补丁推送到Catalyst-Runtime来解决这个问题; 希望它很快就会发布它包含在Catalyst-Runtime 5.90115中。