Thanks Also, for completeness, in that doc is also stated Time::Warp and someone also pointed me to Time::Mock and Test::TimeMock. The later seems to have the best interface for my needs, so I'll go with that.
On Sat, Feb 15, 2014 at 6:05 AM, David Precious <dav...@preshweb.co.uk> wrote: > On Fri, 14 Feb 2014 16:21:52 -0500 > shawn wilson <ag4ve...@gmail.com> wrote: > >> What I want is to be able to make a program /think/ that it's like a >> week in the future without messing with the system time at all. So >> something that overrides gmtime and localtime and the like with some >> starting point would be awesome. Anything like that? >> > > Time::Fake on CPAN appears to fit the bill: > > https://metacpan.org/pod/Time::Fake > > Install it, then e.g.: > > perl -MTime::Fake="+20y" yourscript.pl > > (See the docs for the various options etc.) > > > -- > David Precious ("bigpresh") <dav...@preshweb.co.uk> > http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter > www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook > www.preshweb.co.uk/cpan www.preshweb.co.uk/github > > > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/