![]() |
|
P is for Practical | |
PerlMonks |
Mock system clock on Windows?by DrWhy (Chaplain) |
on Apr 25, 2007 at 02:08 UTC ( [id://611900]=perlquestion: print w/replies, xml ) | Need Help?? |
DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks,
I'm testing licensing restrictions on a Window application (using a Perl test scripts) and I want to test the behavior when the license expires. The format of the license file (FlexLM) does not allow you to set an expiration time, only an expiration date. The expiration happens at midnight. I want to be able to run the test at any time -- not just midnight. Is there anyway in Perl to mock the system clock so that the application when launched by Perl will see the time I want it to see, rather than the real clock? Note: This is not a job for Test::MockTime because that only mocks time inside the Perl interpreter itself, not external processes it launches. --DrWhy "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
Back to
Seekers of Perl Wisdom
|
|