in reply to Switch depreciated?
Does your code(-base) use Switch;? If so, see Switch. It prominently states in the section NAME
Switch - A switch statement for Perl, do not use if you can use given/when
Also, see the BUGS section:
There are undoubtedly serious bugs lurking somewhere in code this funky :-) Bug reports and other feedback are most welcome.
May create syntax errors in other parts of code.
On perl 5.10.x may cause syntax error if "case" is present inside heredoc.
In general, use given/when instead. It were introduced in perl 5.10.0. Perl 5.10.0 was released in 2007.
So the perl you are using has given/when, and you'd better scan your codebase, remove any use Switch and replace switch/case with given/when instead of silencing Perl::Critic.
|
|---|