1.12 Packages, Modules, and Objects

A package allows us to put a boundary around a portion of our code. The concept of a package enables us to organize our code into small partitions that we can use to achieve a larger task. If the program that we want to write is large and several people work on parts of it, the concept of a package will allow us to break up the code into parts that can be developed by independent groups or individuals as long as the interfaces are stated well. The concept of modules is very similar to that of packages. Finally, using the concept of packages and the concept of references (to be discussed later), we can do object-oriented programming in Perl. We will not discuss these three topics in this chapter. These are complex topics and details are left for Chapter.