在Raku中使用Perl 5模块的Data :: Printer的show_tied选项时,如何将其关闭?]

问题描述 投票:0回答:1
我已经在Perl中使用了CPAN Perl模块Data :: Printer(DP)。效果很好。

现在我想在Raku代码中使用它。

[当我使用:from<Perl5>功能导入它,然后使用它运行代码时,注释(tied to Perl6::Hash)会附加到散列的显示中。

1

DP's CPAN doc所示,此注释由选项show_tied控制。我想将其切换为[[off(将其设置为0),而不是将其默认为

on(设置为1)。这是我在Perl中执行的操作:use Data::Printer show_tied => 0;

但是当我在Raku中尝试时:
use Data::Printer:from<Perl5> show_tied => 0;

我得到:

从'Data :: Printer'导入时出错:没有这样的标签'show_tied'

在Raku中使用DP时如何关闭show_tied

脚注

1

也许是因为Inline::Perl5(实现了:from<Perl5>功能)正在做一些事情来启用平滑的Perl / Raku互操作。

我已经在Perl中使用了CPAN Perl模块Data :: Printer(DP)。效果很好。现在,我想在Raku代码中使用它。当我使用:from 功能导入它,然后使用它运行代码时,...

perl import module tags raku
1个回答
0
投票
在Raku中使用DP时如何关闭show_tied
© www.soinside.com 2019 - 2024. All rights reserved.