The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Search results for "module:Perl::Critic::Policy::Variables::ProhibitPunctuationVars"

Perl::Critic::Policy::Variables::ProhibitPunctuationVars - Write $EVAL_ERROR instead of $@. River stage three • 133 direct dependents • 408 total dependents

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. River stage three • 133 direct dependents • 408 total dependents

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. River stage three • 133 direct dependents • 408 total dependents

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
3 results (0.057 seconds)