B.3. PackagesPackages[400] allow you to compartmentalize the namespaces. Imagine that you have ten programmers all working on one big project. If you use the global names $fred, @barney, %betty, and &wilma in your part of the project, what happens when I accidentally use one of those same names in my part? Packages let us keep these separate; I can access your $fred, and you can access mine, but not by accident. Packages are needed to make Perl scalable, so that we can manage large programs.
Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|