Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Simulating the Future

by dynamo (Chaplain)
on Jan 04, 2008 at 19:53 UTC ( [id://660461]=note: print w/replies, xml ) Need Help??


in reply to Re: Simulating the Future
in thread Simulating the Future

Well, that's sorta like what I was thinking.. The problem is that I can't make something like mytime() and replace throughout the code because A> waaaay too many to replace, and B> it's an internal codebase change. The testing system has to fake the time externally to validate the code, otherwise it would be modified again when I take out the test..

My first thought was to try using something like this:

package FakeTime; sub main::time { 12345 } 1;
That didn't work. Neither did "sub ::time { 12345 }", I thought that might work as a second resort. Didn't.

- d

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://660461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2026-04-21 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.