The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Search results for "dist:Perl-Critic-Policy-ControlStructures-ProhibitReturnInDoBlock UTGWKK"

Perl::Critic::Policy::ControlStructures::ProhibitReturnInDoBlock - Do not "return" in "do" block River stage one • 1 direct dependent • 1 total dependent

Using "return" statement in "do" block causes unexpected behavior. A "return" returns from entire subroutine, not from "do" block. sub foo { my ($x) = @_; my $y = do { return 2 if $x < 10; # not ok return 3 if $x < 100; # not ok 4; }; return $x * $y;...

UTGWKK/Perl-Critic-Policy-ControlStructures-ProhibitReturnInDoBlock-0.03 - 16 Nov 2020 02:12:44 UTC
1 result (0.025 seconds)