- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我无意中使用了 Perl 5.14 的实验性 autoderef Perl 5.20 中的功能,当然会收到有关其使用的警告。 diagnostics
pragma 解释了如何在需要时抑制这些警告消息;但是,我想了解有关此警告的根本原因(以及真正的整体功能)的更多信息,因此我求助于 perldoc
以了解有关 autoderef
的更多信息。
perldoc experimental
命令列出了 autoderef
功能及其用途的高级声明,但仅此而已。
perldoc perlexperiment
命令提供了有关其他实验性功能的更多详细信息,但根本没有提及 autoderef
。
我已经尝试了各种其他 perldoc
选项(例如,-v
、-f
等),但无济于事。
使用 perldoc
追踪此类 warning
/diagnostics
消息的有效方法是什么? perldoc
中是否包含实验性功能?
更新:请参阅下面@ThisSuitIsBlackNot 的出色回答。
为了进一步清晰和引用:autoderef
命名空间并没有贯穿所有各种文档(即 perlexperiment
、perldelta
),这似乎很奇怪>、perldoc
等)。 perldoc experiment
称之为autoderef
,perldelta5140
称之为auto-deref
。 perldoc perlexperiment
使用了 perldelta
页面中的一些语言,但不是 autoderef
等。
由于 diagnostics
声明可以使用 no warnings "experimental::autoderef"
来抑制相关的警告。最好将其用作 perldoc
的起点。也就是说,使用 perldoc experimental::autoderef
查找相关文档,匹配 diagnostics
和/或 warnings
提供的语法和语义。
最佳答案
当向 Perl 核心添加或删除功能时,它们记录在 perldelta
中,因此,如果您收到有关某项功能处于试验阶段的警告,那么这是一个值得关注的地方。
如果您知道该功能是在 Perl 5.14.0 中添加的:
perldoc perl5140delta
如果不是:
grep -lr autoderef $(dirname $(perldoc -l perldelta))
您在 perl5140delta
中链接到的描述本身就相当详尽,但请注意,它给出了 autoderef 适用的内置函数列表。运行 perldoc -f <function>
查看内置函数的文档,例如 perldoc -f push
:
Starting with Perl 5.14,
push
can take a scalarEXPR
, which must hold a reference to an unblessed array. The argument will be dereferenced automatically. This aspect ofpush
is considered highly experimental. The exact behaviour may change in a future version of Perl.
警告的原因记录在 perl5200delta
中:
The "auto-deref" feature is experimental.
Starting in v5.14.0, it was possible to use push, pop, keys, and other built-in functions not only on aggregate types, but on references to them. The feature was not deployed to its original intended specification, and now may become redundant to postfix dereferencing. It has always been categorized as an experimental feature, and in v5.20.0 is carries a warning as such.
实际上,perlexperiment
中提到了 autoderef ,尽管它位于“数组和散列容器函数接受引用”标题下(与 perl5140delta
中使用的标题相同):
Array and hash container functions accept references
Introduced in Perl 5.14.0
The ticket for this feature is [perl #119437].
如果您查看 online documentation , 你可以点击链接到 issue #119437在 Perl 的问题跟踪器中,您可以在其中跟踪与该功能相关的开发详细信息。
如果你好奇的话,它看起来像autoderef is getting axed在下一个版本中:
The
autoderef
feature has been removedThe experimental
autoderef
feature (which allowed callingpush
,pop
,shift
,unshift
,splice
,keys
,values
, andeach
on a scalar argument) has been deemed unsuccessful. It has now been removed; trying to use the feature (or to disable theexperimental::autoderef
warning it previously triggered) now yields an exception.
关于Perl:实验特性和 Perldoc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31466854/
我正在测试 SQL,但我陷入了一个查询。这是一个无用的查询,但我想理解它。 select count(*), floor(rand()*2) as x from table_name group by
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
在我编写代码时,我经常喜欢查看代码库中特定区域的工作原理或某些表达式产生的结果。 大多数其他语言都提供了在运行时评估新的自定义表达式的工具。 Golang 似乎还没有提供这个功能,或者至少没有我使用过
1、kvm 简介 kernel-based virtual machine的简称,是一个开源的系统虚拟化模块,自linux 2.6.20之后集成在linux的各个主要发行版本中。它使用linux
我是中继新手,我正在尝试在并发模式下使用中继现代实验。我已经能够使用 Suspense 和 ErrorBoundary 很好地加载节点、边等。我现在正在处理用于创建和更新对象的表单。 我无法弄清楚如何
我正在参加在线软件安全类(class)。我正在尝试使用 shellcode 进行实验。我编写了一个易受攻击的服务器、一个注入(inject)程序、一个(可能已损坏的)shellcode,我将其转换为程
我最糟糕的噩梦是日期对象,所以我创建了一个 fiddle 来查看它是如何工作的,并尝试为以下格式的 date strings 找到解决方案 2015-10- 05T11:49:13.587Z 但要注意
我一直在研究 Accessibility Object Model API,我认为尝试在 Puppeteer 测试中使用它会很酷。 getComputedAccessibleNode 返回一个 pro
我目前正在概述 C++11 的新特性,由于目前不明原因,其中一些特性无法编译。我使用 gcc version 4.6.0 20100703 (experimental) (GCC) 所以根据 GNU
1.动态年龄判定规则 对象进入老年代的4个常见的时机: 1、 躲过15次gc,达到15岁高龄之后进入老年代; 2、 动态年龄判定规则,如果Survivor区域内年龄1+年龄2+年龄3+年龄n的对象
有没有办法停止ray.tune实验(例如使用 PBT)当明显过度拟合或一个指标长时间没有改善时? 最佳答案 现在,这在 Tune 中得到了很好的支持,https://github.com/ray-pr
我尝试在gcc 6.0的开发中实际使用新的c++ 1z功能。 如果我尝试这个小例子: #include #include namespace fs = std::experimental::fil
我想知道为什么我在服务器端运行实验时必须包含 JavaScript cxApi。此外,我可以通过 PHP 发送选定的实验和变体吗?或者可能通过在没有外部资源(如 cxApi)的情况下注入(inject
我正在开发一个使用 Firebase iOS SDK 的 iOS 应用,我正在尝试弄清楚如何访问用户已看到的所有 Firebase AB 实验以及用户参与的实验变体。 我查看了文档以及 Firebas
我用 python 2.7.7 运行了以下命令: import gc import memory_profiler print memory_profiler.memory_usage()[0] x
我在浏览器控制台中做了一个 JavaScript 实验 - 首先我创建了一个新对象 foo 如下 var foo = { bar: function() { return this.baz
据说“4916 个正面训练示例经过手工挑选对齐、归一化并缩放到 24x24 的基本分辨率。通过从 9500 张不包含人脸的图像中随机挑选子窗口来选择 10,000 个负面示例。”在论文“Paul Vi
这个问题在这里已经有了答案: 关闭 12 年前。 Possible Duplicate: Can you write object oriented code in C? 嗨! 只是为了好玩,这两天
1. 程序的JVM参数示范 已知,平时系统运行创建的对象,除非是那种大对象,否则通常来说都是优先分配在新生代中的Eden区域的。 而且新生代还有另外两块Survivor区域,默认Eden区域占据新
在 上创建新实验DAGsHub 使用Git,".._metrics.csv"的格式应该是什么和 ".._params.yml"文件? 不幸的是,我在任何地方都找不到引用。 最佳答案 特尔;博士: 对于
我是一名优秀的程序员,十分优秀!