time() function for some tests. after a few iterations in solitary that didn't quite cut it, I stumbled upon this list discussion. and so, after far too much independent work, 5 minutes of google yieldedBEGIN {
*CORE::GLOBAL::time = sub { CORE::time };
}
{
no warnings qw(redefine);
local *CORE::GLOBAL::time = sub { $time };
}
while I got the BEGIN part on my own, the trick I was missing in my own hacking was to reassign CORE::GLOBAL::time() to itself so that it would continue to function until my local overrides went into effect.
I imagine that most test-driven people already know this, but just in case I wasn't the only person sleeping in class I thought I'd post it here.
ex::override (Score:2)
Casey West