ahh thank you. so saying
package CJB; is like saying namespace CJB { and saying use BinaryTree; is like saying #include "BinaryTree.h" ? so a package exports certain vars/functions and those var/functions make up a module? thanks again, -- christopher On Friday 19 December 2003 03:51 pm, Bob Showalter wrote: > christopher j bottaro wrote: > > i'm reading "Programming Perl" and i'm on the chapter about packages. > > it says that packages and modules are very similar and that novices > > can think of packages, modules, and classes as the same thing, but i > > wanna know exactly what the differences between packages and modules > > are (i'm a c++ programmer, i know what classes are). > > A package is a namespace. All "global" variables (aka "symbol table" or > "package" variables) and subs live in a package. The package statement is > used to define the default package to be used if no package name is > explicitly specified when the variable or sub is referenced. > > A module is a collection of routines and/or data, decleared in one (or > possibly more than one) package and bundled into a source file for reuse > and distribution. > > Certain Perl constructs assume a correspondence between package names and > module names. The perlmod and perlmodlib documents go in to detail on these > topics. > > perldoc perlmod > perldoc perlmodlib > perldoc -f package > perldoc -f use -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>