March 2005
Intermediate to advanced
1064 pages
34h 51m
English
We have already seen how modules work from the user's perspective through the do, require, and use statements. We have also seen the relationship between modules and packages. In this chapter, we examine the internals of implementing modules.
In order for modules to be easily reusable, they need to be well behaved. That means not defining variables and subroutines outside their own package unless explicitly asked to do so. It also means not allowing external definitions to be made unless the design of the module permits it. Exporting definitions from one package into another allows them to be used without prefixing the name of the original package, but it also runs the risk of a namespace collision, so both ...
Read now
Unlock full access