package DESTROY::EVAL_ERROR::NOT; my %done; sub import { shift @_; for my $pkg ( @_ ) { next if $done{$pkg}++; $pkg .= "::DESTROY"; my $orig= \&{$pkg}; no warnings; *{$pkg}= sub { local $@; $orig->(@_) }; } }
Then:
use Broken::Package; use DESTROY::EVAL_ERROR::NOT qw( Broken::Package ); ...
In other words, "if I can't change EvalEater" need never be true. :)
- tye
In reply to Re^3: Question on "Effective Perl Programming" (intervene)
by tye
in thread Question on "Effective Perl Programming"
by jfroebe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |