in reply to Module Modification at Runtime
Not that I don't admire the evilness of the technique, but wouldn't it be easier to do something like this?
{ my $old = \&HTML::TableExtract::TableState::_taste_text; no warnings; *HTML::TableExtract::TableState::_taste_text = sub { local *HTML::TableExtract::TableState::_taste_text = $old; eval { shift->_taste_text(@_) }; print STDERR $@ if $@; die $@; }; };
This would only fall down if _taste_text depended on the state of the call stack (which you could get around with Sub::Uplevel), or does different things if not called as a method (which you could get around with called_as_method from Devel::Caller).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Module Modification at Runtime
by diotalevi (Canon) on Mar 26, 2003 at 13:17 UTC |