Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: CORE::GLOBAL magic?

by kcott (Chancellor)
on Jun 02, 2018 at 02:39 UTC ( #1215714=note: print w/replies, xml ) Need Help??


in reply to CORE::GLOBAL magic?

G'day morgon,

I believe you're making incorrect assumptions about CORE::GLOBAL. Here's a repeat of your examples along with equivalents not involving CORE::GLOBAL.

$ perl -wle 'print \&CORE::GLOBAL::sleep' CODE(0x224fcb8) $ perl -wle 'print \&CORE::GLOBAL::hubbabubba' CODE(0x1d4acb8) $ perl -wle 'print \&hubbabubba' CODE(0x255bcb8) $ perl -wle '&CORE::GLOBAL::sleep(1)' Undefined subroutine &CORE::GLOBAL::sleep called at -e line 1. $ perl -wle '&CORE::GLOBAL::hubbabubba(1)' Undefined subroutine &CORE::GLOBAL::hubbabubba called at -e line 1. $ perl -wle '&hubbabubba(1)' Undefined subroutine &main::hubbabubba called at -e line 1.

As you can see, the outcomes are the same with or without CORE::GLOBAL.

I can't really comment on internals: I'm not sufficiently versed in that area. There are, however, plenty of monks who can help with that.

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1215714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2018-11-18 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (205 votes). Check out past polls.

    Notices?