Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: What is module? Difference between module and package?

by ioannis (Abbot)
on Oct 28, 2005 at 08:57 UTC ( #503599=note: print w/replies, xml ) Need Help??


in reply to What is module? Difference between module and package?

packages are namespace areas so that symbols with similar names do not clash with one another. For example, the symbol &main::first is different from symbol &List::Util::first . Packages are name prefixes to sysbols.

A module is a file of code, or a tree of bytecodes. A module could be precompiled (.pmc), uncompiled (.pm) on disk; or pre-loaded in memory as one unit -- assuming no autosplit.

In summary: packages are about namespaces, and modules are about files. They are different things, like apples and boxes -- until the day when you start placing one kind of apple into one kind of box, and people start thinking that apples and boxes are related. And they are! but still, one in fruit and the other is a type of container.

  • Comment on Re: What is module? Difference between module and package?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-11-30 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?