Search results for "module:Perl::Critic::Policy::Variables::ProhibitPunctuationVars"
Perl::Critic::Policy::Variables::ProhibitPunctuationVars - Write $EVAL_ERROR instead of $@.
Perl's vocabulary of punctuation variables such as $!, $., and $^ are perhaps the leading cause of its reputation as inscrutable line noise. The simple alternative is to use the English module to give them clear names. $| = undef; #not ok use English...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC
Perl::Critic::Policy::Variables::ProhibitPackageVars - Eliminate globals declared with our or use vars.
Conway suggests avoiding package variables completely, because they expose your internals to other packages. Never use a package variable when a lexical variable will suffice. If your package needs to keep some dynamic state, consider using an object...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC
Perl::Critic::Policy::Variables::ProhibitLocalVars - Use my instead of local, except when you have to.
Since Perl 5, there are very few reasons to declare "local" variables. The most common exceptions are Perl's magical global variables. If you do need to modify one of those global variables, you should localize it first. You should also use the Engli...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC