Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Understanding use and require fully

by msk_0984 (Friar)
on Aug 02, 2008 at 09:12 UTC ( [id://701804]=note: print w/replies, xml ) Need Help??


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

Hey,

Here are few differences bewteen use and require which may make it more clear for you.

  • use only expects a bareword, require can take a bareword or an expression
  • use is evaluated at compile-time, require at run-time
  • use implicitly calls the import method of the module being loaded, require does not
  • use excepts arguments in addition to the bareword (to be passed to import), require does not
  • use does not behave like a function (i.e can't be called with parens, can't be used in an expression, etc), whereas require does


Sushil Kumar
  • Comment on Re^2: Understanding use and require fully

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (None)
    As of 2024-04-25 01:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found