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

Nobody in particular
carnil [...]

(no value)
Broken in:
(no value)
Fixed in:
(no value)

Subject: libperl-critic-perl: eval return value checking policy now obsolete
Hi This bug has been forwarded from This is about ErrorHandling::RequireCheckingReturnValueOfEval with Perl 5.14, where this problem was fixed. The original reporter suggested in case this should be keept for supporting older versions of Perl, to have this noted in the documentation. ----cut---------cut---------cut---------cut---------cut---------cut----- Package: libperl-critic-perl Version: 1.118-1 Severity: normal The ErrorHandling::RequireCheckingReturnValueOfEval policy is, I believe, now thankfully obsolete since that bug was fixed in Perl in 5.14. It may still be of interest to people who want to support older versions of Perl, but this should at least be noted in its documentation, and I'm not sure that it still belongs in the default set for jessie. perl5140delta: Exception Handling To make them more reliable and consistent, several changes have been made to how "die", "warn", and $@ behave. · When an exception is thrown inside an "eval", the exception is no longer at risk of being clobbered by destructor code running during unwinding. Previously, the exception was written into $@ early in the throwing process, and would be overwritten if "eval" was used internally in the destructor for an object that had to be freed while exiting from the outer "eval". Now the exception is written into $@ last thing before exiting the outer "eval", so the code running immediately thereafter can rely on the value in $@ correctly corresponding to that "eval". ($@ is still also set before exiting the "eval", for the sake of destructors that rely on this.) Likewise, a "local $@" inside an "eval" no longer clobbers any exception thrown in its scope. Previously, the restoration of $@ upon unwinding would overwrite any exception being thrown. Now the exception gets to the "eval" anyway. So "local $@" is safe before a "die". Exceptions thrown from object destructors no longer modify the $@ of the surrounding context. (If the surrounding context was exception unwinding, this used to be another way to clobber the exception being thrown.) Previously such an exception was sometimes emitted as a warning, and then either was string-appended to the surrounding $@ or completely replaced the surrounding $@, depending on whether that exception and the surrounding $@ were strings or objects. Now, an exception in this situation is always emitted as a warning, leaving the surrounding $@ untouched. In addition to object destructors, this also affects any function call run by XS code using the "G_KEEPERR" flag. [...] ----cut---------cut---------cut---------cut---------cut---------cut----- Thanks in advance, Salvatore Bonaccorso, Debian Perl Group

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

Please report any issues with to