Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Understanding use and require fully

by chromatic (Archbishop)
on Aug 01, 2008 at 17:44 UTC ( #701757=note: print w/replies, xml ) Need Help??


in reply to Re: Understanding use and require fully
in thread Understanding use and require fully

use Module LIST is equivalent to: BEGIN { require Module; import Module LIST; }

Nit: it's actually equivalent to:

BEGIN { require Module; Module->import( LIST ); }

use always performs a method call, where the indirect invocation form you had sometimes does not perform a method call. (If you want to be very specific, it's probably closer to Module::->import( LIST ), but you have to read the code to Perl_utilize() in C to make sure of that.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2023-06-07 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?