in reply to Copy a builtin sub to a different name and then override
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Copy a builtin sub to a different name and then override
by bliako (Abbot) on Jun 01, 2018 at 23:10 UTC | |
by LanX (Saint) on Jun 02, 2018 at 18:34 UTC | |
by LanX (Saint) on Jun 01, 2018 at 23:30 UTC | |
by bliako (Abbot) on Jun 01, 2018 at 23:36 UTC | |
by LanX (Saint) on Jun 02, 2018 at 00:19 UTC | |
| |
| A reply falls below the community's threshold of quality. You may see it by logging in. |