david2008 has asked for the wisdom of the Perl Monks concerning the following question:
How do i change a function of perl in runtime?
I need it for testing issues.
I have a class A with function x.
This function x calls function y.
I want to check the behavior when y crashes.
So i want to change y with the function sub {die "aaa"}, make the test and then change it back.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: change perl function in runtime
by LanX (Saint) on Dec 03, 2012 at 15:19 UTC | |
by david2008 (Scribe) on Dec 03, 2012 at 15:41 UTC | |
Re: change perl function in runtime
by space_monk (Chaplain) on Dec 03, 2012 at 15:13 UTC | |
by ColonelPanic (Friar) on Dec 03, 2012 at 15:40 UTC | |
by space_monk (Chaplain) on Dec 03, 2012 at 19:21 UTC | |
by ColonelPanic (Friar) on Dec 04, 2012 at 08:43 UTC | |
by david2008 (Scribe) on Dec 03, 2012 at 15:28 UTC | |
Re: change perl function in runtime
by grondilu (Friar) on Dec 03, 2012 at 15:44 UTC | |
by ColonelPanic (Friar) on Dec 03, 2012 at 15:47 UTC | |
Re: change perl function in runtime
by DrHyde (Prior) on Dec 05, 2012 at 11:58 UTC |