Matt Sergeant <[EMAIL PROTECTED]> writes:
> On Fri, 2 Nov 2001, Piers Cawley wrote:
>
>> > I did actually get started on an Error::Filter module, which worked as a
>> > source filter, allowing try/catch without the closure bug. Unfortunately
>> > it was on my laptop which died. I may get back to it when I finish the
>> > umpteen other modules I have to write :-)
>>
>> The closure bug? What did I miss? I *like* try/catch...
>
> The fact that with Error.pm, try { ... } creates a closure, without you
> really knowing it. This can cause pretty serious leaks and bugs if you're
> not careful. Error::Filter gets (got?) around this by turning try {...}
> into eval { ... } which doesn't create a closure, it's an ordinary block.
With the added advantage that @_ will be the @_ of the enclosing sub. Nice.
--
Piers
"It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite."
-- Jane Austen?