Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 43309
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.096
Fixed in: 1.108



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()';
On Sun Feb 15 09:00:10 2009, DAXIM wrote: Show quoted text
> 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()';
This appears to no longer be a problem since Adam upgraded PPI to handler Perl 5.010. SVN revision 3754 adds a test for it.