http://www.perlmonks.org?node_id=1215774


in reply to Re^2: Copy a builtin sub to a different name and then override
in thread Copy a builtin sub to a different name and then override

This isn't checking if CORE::GLOBAL::sleep exists, it's forcing it to exist. It's another form of autovivification. Taking a reference to a nonexistent sub like this will create a stub in its place (like sub CORE::GLOBAL::sleep;). A stub of course isn't callable.

The correct way to check for the existence of a sub is using either exists &Some::sub or defined &Some::sub. exists will return true for subs that exist, even if they are stubs. defined will return true only for not-stub subs.