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

Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations - Do not write my $foo = $bar if $baz; . River stage three • 131 direct dependents • 386 total dependents

Declaring a variable with a postfix conditional is really confusing. If the conditional is false, its not clear if the variable will be false, undefined, undeclared, or what. It's much more straightforward to make variable declarations separately. my...

PETDANCE/Perl-Critic-1.142 - 29 Nov 2022 02:20:23 UTC

Test::Perl::Critic::Progressive - Gradually enforce coding standards. River stage two • 7 direct dependents • 30 total dependents

Applying coding standards to large amounts of legacy code is a daunting task. Often times, legacy code is so non-compliant that it seems downright impossible. But, if you consistently chip away at the problem, you will eventually succeed! Test::Perl:...

THALJEF/Test-Perl-Critic-Progressive-0.03 - 27 Jul 2008 23:06:06 UTC

Perl::Critic::Policy::Community::ConditionalDeclarations - Don't declare variables conditionally River stage one • 8 direct dependents • 9 total dependents

It is possible to add a postfix condition to a variable declaration, like "my $foo = $bar if $baz". However, it is unclear (and undefined) if the variable will be declared when the condition is not met. Instead, declare the variable and then assign t...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC
3 results (0.131 seconds)