Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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]
[Corion]: marto: Ouch, yeah...
[marto]: the boys uncle will take them for a couple of hours this afternoon :)
[marto]: only at work 3 days this week, then off to Copenhagen for a wedding
[marto]: back the following Monday, potentially gone 2-3 days the next week for work
[Corion]: Oh - "Cyber Monday" week is coming up... That's why weird stuff is already discounted now...
[Corion]: marto: Oh, cool, I hope you get to enjoy the trip and Copenhagen! I found it nice (but the mermaid is underwhelming)
[marto]: the kids and their mother are coming too, actually only 9 people at the wedding in total. Still, will be fun

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-11-19 11:38 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (280 votes). Check out past polls.