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:
38629
Status:
new
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
Normal
Broken in:
(no value)
Fixed in:
(no value)



Subject: ErrorHandling::RequireCheckingReturnValueOfEval not allowing "return eval ..."
ErrorHandling::RequireCheckingReturnValueOfEval complains when you do something like this: sub foo { return eval { 42 }; } Probably just an oversight in the policy. Test::Builder does this sort of thing in is_fh()... sub is_fh { my $self = shift; my $maybe_fh = shift; return 0 unless defined $maybe_fh; return 1 if ref $maybe_fh eq 'GLOB'; # its a glob ref return 1 if ref \$maybe_fh eq 'GLOB'; # its a glob return eval { $maybe_fh->isa("IO::Handle") } || # 5.5.4's tied() and can() doesn't like getting undef eval { (tied($maybe_fh) || '')->can('TIEHANDLE') }; }


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.