Search results for "module:Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls"

Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls - Write if($condition){ do_something() } instead of do_something() if $condition. River stage three • 130 direct dependents • 394 total dependents

Conway discourages using postfix control structures ("if", "for", "unless", "until", "when", "while") because they hide control flow. The "unless" and "until" controls are particularly evil because they lead to double-negatives that are hard to compr...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC

Perl::Critic - Critique Perl source code for best-practices. River stage three • 130 direct dependents • 394 total dependents

Perl::Critic is an extensible framework for creating and applying coding standards to Perl source code. Essentially, it is a static source code analysis engine. Perl::Critic is distributed with a number of Perl::Critic::Policy modules that attempt to...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC

Perl::Critic::Config - The final derived Perl::Critic configuration, combined from any profile file and command-line parameters. River stage three • 130 direct dependents • 394 total dependents

Perl::Critic::Config takes care of finding and processing user-preferences for Perl::Critic. The Config object defines which Policy modules will be loaded into the Perl::Critic engine and how they should be configured. You should never really need to...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC

Perl::Critic::Policy::ControlStructures::ProhibitUnreachableCode - Don't write code after an unconditional die, exit, or next. River stage three • 130 direct dependents • 394 total dependents

This policy prohibits code following a statement which unconditionally alters the program flow. This includes calls to "exit", "die", "return", "next", "last" and "goto". Due to common usage, "croak" and "confess" from Carp are also included. Code is...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC

Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks - Write while(! $condition) instead of until($condition). River stage three • 130 direct dependents • 394 total dependents

Conway discourages using "until" because it leads to double-negatives that are hard to understand. Instead, reverse the logic and use "while". until($condition) { do_something() } #not ok until(! $no_flag) { do_something() } #really bad while( ! $con...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC

Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks - Write if(! $condition) instead of unless($condition). River stage three • 130 direct dependents • 394 total dependents

Conway discourages using "unless" because it leads to double-negatives that are hard to understand. Instead, reverse the logic and use "if". unless($condition) { do_something() } #not ok unless(! $no_flag) { do_something() } #really bad if( ! $condit...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC
6 results (0.067 seconds)