<?xml version="1.0" encoding="windows-1252"?>
<node id="1006889" title="change perl function in runtime" created="2012-12-03 10:05:05" updated="2012-12-03 10:05:05">
<type id="115">
perlquestion</type>
<author id="693920">
david2008</author>
<data>
<field name="doctext">
Hi,
&lt;p&gt;
How do i change a function of perl in runtime?&lt;br&gt;
I need it for testing issues.&lt;br&gt;
I have a class A with function x.&lt;br&gt;
This function x calls function y.&lt;br&gt;
I want to check the behavior when y crashes. &lt;br&gt;
So i want to change y with the function sub {die "aaa"}, make the test and then change it back.&lt;br&gt;
&lt;/p&gt;
Thanks,
 </field>
</data>
</node>
