in reply to Modules or Classes
In Perl (current versions anyway) a class is just a usage pattern for a package. That is, any package can be used as a class. (Though if the package is not designed to be used as a class, the results will probably not be especially pleasing.)
Packages are Perl's version of namespaces, and are vaguely tied in with the idea of modules, though in fact you can define multiple packages in the same module; or span a package definition over several modules; or define a package in your main script, not in a module at all.
There are plans to add a new object system to future versions of Perl (possibly starting with 5.18) which would not replace but complement the existing system.
|
|---|