执行催化剂服务器脚本时面临以下问题。

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?

最佳答案

这是Catalyst中的错误。 Catalyst::ScriptRole(自2012年以来!)中存在一些类型检查代码,该代码已完全损坏,但该损坏仅在特定情况下可见;即,如果脚本为Catalyst::ScriptRole提供了loader_class,而该代码尚未提供加载的类(可能没有人拥有),或者系统是否具有很旧的UNIVERSAL.pm版本(如perl 5.8附带的版本)。这是您遇到的第二种情况。

我已经将补丁发布到Catalyst-Runtime来解决此问题;希望它将很快发布,并包含在Catalyst-Runtime 5.90115中。

关于perl - Catalyst对Perl 5.8.8的支持,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42883017/

10-10 13:13