首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Perl Dancer和Mason2

Perl Dancer和Mason2
EN

Stack Overflow用户
提问于 2021-05-24 05:07:24
回答 1查看 102关注 0票数 1

我正在使用舞者的Mason2模板。当我尝试在模板中调用"Dancer qw(session)“时,我得到了下面显示的错误。我只是编写了带有根路由的"hello world“应用程序,显示了index.mc模板。我已经安装了最新的Perl5.26和Dancer版本1.3513。

模板:

代码语言:javascript
复制
<%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>

错误:

代码语言:javascript
复制
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", 0, 1) called at C:/Strawberry/perl/vendor/lib/Devel/Declare/MethodInstaller/Simple.pm line 25

我错过了什么?

EN

回答 1

Stack Overflow用户

发布于 2021-05-26 22:50:13

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

由于这个原因,我们最近更新到了Function::Parameters

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67664364

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档