Howdy,
I'm trying to change the behavior of a function (whose use of and call I
have no control over) to avoid some nasty behavior in certain circumstances.
Its easy enough to redefine it but after the hairy part is done I want
to change it back.
Similar to how you can:
{
local $var;
...
}
# $var back to what it was before that block
except I need to do it with a function:
sub What::ever { return }
do_scary_stuff_that_what_ever_usually_breaks();
restore_back_to_original_state_the_function('What::ever');
Like I said changing it in the first place is easy and can be done
several ways but is there a way to do it and get it back to how it was?
(Yes I fiddled with ref's, changing it changes what its referenced to so
the ref now points to the new version like you'd expect...)
TIA!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>