Slash Boxes

All the Perl that's Practical to Extract and Report

More | Login | Reply
Loading... please wait.
    • That's not quite what this is about. The problem is that $@ gets set to undef whenever an eval runs successfully, eradicating the current exception object before it can get handled by reaching the intended eval.

      The critic rule would be to always require

      DESTROY {
          local $@;

      where ... either contains an eval BLOCK, or a sub call which could potentially involve an eval BLOCK. A bit pedantic perhaps, but probably worth it since the alternative is to risk silencing exceptions!.