Perl Dancer 和 Mason2

问题描述

我正在为 Dancer 使用 Mason2 模板。当我尝试在模板中调用“Dancer qw(session)”时,出现如下错误。我只是用显示 index.mc 模板的根路由编写“hello world”应用程序。我已经安装了最新的 perl 5.26 和 Dancer 版本 1.3513。

模板:

<%class>
use Dancer qw(session);
</%class>

<%augment wrap>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Portal</title>
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">


  <body>

    <div class="container">
        <div class="page-header">
          TESTING
          <br>
          <% inner() %>

  </body>
</html>
</%augment>

错误:

Couldn't find declarator 'method' at C:/Strawberry/perl/vendor/lib/Devel/Declare/Context/Simple.pm line 47.
    Devel::Declare::Context::Simple::skip_declarator(Method::Signatures::Simple=HASH(0x5df6ac8)) called at C:/Strawberry/perl/vendor/lib/Devel/Declare/MethodInstaller/Simple.pm line 62
    Devel::Declare::MethodInstaller::Simple::parser(Method::Signatures::Simple=HASH(0x5df6ac8),"method",1) called at C:/Strawberry/perl/vendor/lib/Devel/Declare/MethodInstaller/Simple.pm line 25

    

我缺少什么?

解决方法

Method::Signatures 被最新版本的 Devel::Declare 破坏。如果您想使用 Devel::Declare,请安装 0.006019 版本 Method::Signatures 或更低版本。

因此,我们最近更新了 Function::Parameters

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...