Subject: | Time::Mock should have a way to un-mock itself |
It seems like Time::Mock should have an obvious, explicit way to un-mock
itself.
For example, if I execute "Time::Mock->offset(SESSION_LIFETIME + 1);",
then I'd like to be able to execute something like "Time::Mock->reset()"
after I'm done testing my expired session. That would make time() work
like it always did, until the next time I call a Time::Mock function.
As it is, I'm resetting the clock by executing "Time::Mock->offset(0);",
and I don't find that to be very intuitive or safe. Its behavior is
also ill-defined: reading the documentation, I'm not necessarily certain
whether offset(0) will set the time back to the time at which the module
was imported or to the current system time.
Thanks for the great work. Before I found your module, I tried using
Test::MockObject on CORE, and that didn't work very well. :)