Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks3pm
Write "while(! $condition)" instead of "until($condition)".
Affiliation
This Policy is part of the core Perl::Critic distribution.
Overview
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 okuntil(! $no_flag) { do_something() } #really badwhile( ! $condition) { do_something() } #ok
This Policy only covers the block-form of "until". For the postfix variety, see "ProhibitPostfixControls".
Configuration
This Policy is not configurable except for the standard options.
Releases
10 releases since Debian 5.0 (Lenny); the text changed 9 times.