Thanks for your reply. I took a look at these two modules:

Time:Mock

I read both:

http://search.cpan.org/dist/Time-Mock/lib/Time/Mock.pm

and:

http://search.cpan.org/~ewilhelm/Time-Mock-v0.0.1/lib/Time/Mock.pm#Class_Methods

about this, and although I certainly don't understand most of what is described there, it sounds like it does something different. Namely that it allows you to speed-up or slow-down the system clock, and there appears to be something about alarms in there. It looks like there are issues with child processes and forking too, although they may have corrected that by now (?)

Time::MockTime

I was unable to find anything about this with a quick Google search. Can you please point me to something that gives an overview of it? (Sorry for my new-ness!)

* * *

An Artificial System Clock does something different: it provides you the ability to trick your system into thinking it is a different date-time. Once implemented, you can instantly move the application forward or backward to a date, run some tests to verify that the system does what it's supposed to in that date-time context, and then instantly move the application to a different date-time, verify more application behavior, etc.

The value the TimeChannels service provides is that it keeps the date-time setting in one, shared ("published") location, where multiple parties can subscribe to it. Especially in building a system that interfaces other systems, if all the interfacing systems have implemented the ASC, and are all subscribing to the same ASC channel, then the testers can coordinate date-time jumps by simply changing the ASC value in one location (i.e., TimeChannels.com), and all the interfacing systems suddenly reflect the new date-time.

* * *

I am very interested in your first statement, though, about replacing the globals. Can you please elaborate on that? Do you mean to replace the contents of existing perl library functions like time, localtime, etc.?

Thanks,

John


In reply to Re^2: Artificial System Clock by JohnBoy
in thread Artificial System Clock by JohnBoy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.