Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Understanding use and require fully

by chromatic (Archbishop)
on Aug 01, 2008 at 17:44 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found