I spent some time today trying to override perl's 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 yielded
BEGIN { *CORE::GLOBAL::time = sub { CORE::time }; } { no warnings qw(redefine);
local *CORE::GLOBAL::time = sub { $time }; }
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.