Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^3: loading modules using 'use'

by Taulmarill (Deacon)
on Jun 30, 2010 at 13:07 UTC ( #847323=note: print w/replies, xml ) Need Help??

in reply to Re^2: loading modules using 'use'
in thread loading modules using 'use'

perl only loads a module once. If you use a Module that is already loaded, it's import function is called, but it is not loaded again.

Replies are listed 'Best First'.
Re^4: loading modules using 'use'
by angshuman (Novice) on Jun 30, 2010 at 13:29 UTC

    by 'load'-ing a module, we do essentially mean that the functions existent in the EXPORT list are placed such that the script having the 'use' statement can call them.(am I right?).

    The why in case of a circular inheritance/depencency, (script uses and, while and have a circular inheritance among them) the script( has acccess to a certain function inside, while does not have access to the same function ?

    Am bringing in the circular dependency example, just to know how perl loads in a module, as I saw understanding this sceanrio will help me understand how perl calls 'use' in general.

    Thanks to all Monks for the quick replies...

    Perl learning has never been more exciting for me with a so many monks to consult with....!!!!!

      ...(script uses and, while and have a circular inheritance among them)...
      That's "circular" as in "dog trying to catch its tail"? :-)

      In my experience if your faced with this it is often best to have another look at the algorithm. Identify what it is that needs from and what needs that is in Put all that in and then both "use"

      The dog still hasn't caught its tail but it has had a chance to see the rabbit. :-)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2023-03-24 19:39 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (61 votes). Check out past polls.