given is experimental at .\[...].pl line [...]. when is experimental at .\[...].pl line [...]. Smartmatch is experimental at C:/strawberry/perl/site/lib/[...] line [...].
看看这些警告 – 我从来没有听说过任何地方 – 我只能在两个地方找到这个,
> perldelta for 5.18,只有真正提到,说,该功能已降级为实验?
> this nntp.perl.org post
Perl Delta仍然做的最多,提到这些功能发生了什么,它的一半埋在pod,
Smart match,added in v5.10.0 and significantly revised in v5.10.1,has been a regular point of complaint. Although there are a number of ways in which it is useful,it has also proven problematic and confusing for both users and implementors of Perl. There have been a number of proposals on how to best address the problem. It is clear that smartmatch is almost certainly either going to change or go away in the future. Relying on its current behavior is not recommended. Warnings will now be issued when the parser sees ~~,given,or when.
我对如何在过去10年中Perl最重要的变化可能被拉扯困惑。我开始使用给定,时间和smartmatch在所有的地方。有关这些期货的更多信息吗?任何人发现他们“困惑?这些功能如何可能改变?有计划用模块实现这些功能吗?
解决方法
具体来说,~~将会大大简化,你可以看到在一个proposal由5.18 pumpking。关于如何两个事情应该匹配的决定将与帮助者,如那些已经存在于Smart::Match。
... ~~ any(...)
更可读,更灵活(完全可扩展),并解决了许多问题(例如“何时应将X视为数字,何时应视为字符串?”)。