in reply to Will 'when()' be removed or deprecated in upcoming version of Perl?

Will 'when()' be removed or deprecated in upcoming version of Perl?

Looking at the latest v5.28.0-RC4's perldelta, perldeprecation, and perlexperiment, the answer is no, smart matching and given/when are not going to change in v5.28.

However, they are still experimental, and so it's still very much possible they may undergo major changes or be removed in a future version. I would strongly recommend avoiding them. The simplest replacement (although not necessarily the prettiest) is if/elsif chains, but there are also several modules on CPAN - just beware of Switch and other modules that make use of source filters.

  • Comment on Re: Will 'when()' be removed or deprecated in upcoming version of Perl?
  • Download Code