Subject: | Subroutines::RequireFinalReturn with given() block |
Perhaps related to bug #38606. The policy says that the sub in the test
below does not end with a return, even though it does.
use Test::Simple tests => 1;
use Perl::Critic qw();
my $violation = Perl::Critic->new('-single-policy' =>
'Subroutines::RequireFinalReturn')->critique(\<<'PERL');
sub foo {
given ($bar) {}
return;
}
PERL
ok !$violation, 'recognises return after given()';