Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: change perl function in runtime

by ColonelPanic (Friar)
on Dec 03, 2012 at 15:40 UTC ( #1006897=note: print w/replies, xml ) Need Help??

in reply to Re: change perl function in runtime
in thread change perl function in runtime

I have to disagree with you. This is a perfectly reasonable request. In fact, this is considered a good practice for testing complex software.

There are lots of reasons for doing things like this:

  1. You may not have control over function y
  2. It might do something that you don't want to do during testing (such as submit a credit card order...)
  3. It might take a long time to run.
  4. It might be hard to reproduce certain kinds of output.
  5. It might not be written yet, or it might have bugs of its own (simulating part of the software allows you to develop/test multiple interdependent pieces of code simultaneously).

When's the last time you used duct tape on a duct? --Larry Wall

Replies are listed 'Best First'.
Re^3: change perl function in runtime
by space_monk (Chaplain) on Dec 03, 2012 at 19:21 UTC
    Thanks for the reasons. I normally suppress things I don't want to do during a test run, but I can see your points :-)
    A Monk aims to give answers to those who have none, and to learn from those who know more.

      Obviously, changing function calls at run time is not the only way to overcome the above problems. The important thing is using good testing principles, rather than a particular implementation.

      I think it is a useful and powerful tool for certain kinds of testing.

      When's the last time you used duct tape on a duct? --Larry Wall

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006897]
[Discipulus]: which node yesterday?
[Discipulus]: i cannot see any link to tye post..
[Lady_Aleena]: Hello.
[marto]: teleconf + coffee, I'll post it in a few mins
[beech]: fencepost?
beech is protected with velcro

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-06-23 08:53 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (538 votes). Check out past polls.