in reply to Closures, object destruction and memory leaks
Trying this on 5.8.0 appears to work. I didn't see any warnings in the documentation on %SIG or local() regarding this.
sub f { local $SIG{INT} = sub { die "a" }; {redo} } $\ = "\n"; print $SIG{INT} ? 1 : 0; eval { f(); }; print $SIG{INT} ? 1 : 0;
|
|---|