http://www.perlmonks.org?node_id=1039456

coolmichael has asked for the wisdom of the Perl Monks concerning the following question:

I've been reading the Perl 5.18 delta, and now that smartmatch is both experimental and depreciated I'm in a bit of a muck. I have a big project that uses given/when quite heavily (28 givens, 85 whens).

What is the recommended way to fix this? I know I can turn off the warning, but I'd rather fix the code. The documentation says that given/when is subject to big changes and might even go away, so disabling the warning is only a temporary fix. An automatic fix would be nice, but I don't mind doing all the work by hand. I have a good test suite, so I'm not concerned about breaking things.

Mostly the given/whens look like this:

given($foo) { when('abc') {...} when(['foo', 'bar']) {...} default {...} };