Perl::Critic::Policy::Variables::ProhibitMatchVars3pm
Avoid "$`", "$&", "$'" and their english equivalents.
Affiliation
This Policy is part of the core Perl::Critic distribution.
Overview
Using the "match variables" "$`", $&, and/or "$'" can significantly degrade the performance of a program. This policy forbids using them or their English equivalents. See perldoc English or PBP page 82 for more information.
It used to forbid plain "use English;" because it ends up causing the performance side-effects of the match variables. However, the message emitted for that situation was not at all clear and there is now Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish, which addresses this situation directly.
Configuration
This Policy is not configurable except for the standard options.
Releases
10 releases since Debian 5.0 (Lenny); the text changed 9 times.