Actually, eval without diagnostics after the call and without localizing $@ is what's dangerous here, not the pattern itself. And that doesn't apply to DESTROY only, although not with such catastrophic consequences. Like trampling on $_. Yes, "hooray for global variables"... ;-)
In reply to Re^2: Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???
by shmem
in thread Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???
by Jenda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |