Try code refs instead
my $actual_sleep = \&CORE::GLOBAL::sleep; # and later $actual_sleep->($_[0])
Untested!
That's the normal way to install a wrapper, but I'm not sure if that's recommended with builtins. ..
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
*) see demo here Re^5: Copy a builtin sub to a different name and then override
In reply to Re: Copy a builtin sub to a different name and then override
by LanX
in thread Copy a builtin sub to a different name and then override
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |