NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Perl::Critic (Score:1)
Perl::Critic::Policy::Variables::RequireLocalizedPunctuationVars [cpan.org] to the rescue!
Reply to This
Re: (Score:1)
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
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!.
Of