ふり返る暇なんて無いね

日々のメモ書きをつらつらと。メインブログに書くほどでもないことを流してます

Perl 5.18からsmart matchはexperimentalなので使わないで

The smartmatch family of features are now experimental

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.

http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#The_smartmatch_family_of_features_are_now_experimental

将来的に変更もしくは削除するのは確実なので、コードから消してください。

5.18から警告が出るようになって、社内のコードでwarnがいっぱい出てうざったかった話でした。ふつうに=~を使えば良い場面だったので、問題は無かったです。