Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
For a beginner level view, which gets you thru most cases, a package is used inline
with the main source code; whearas when you want to put the package into a separate file, you call it a module. The nice thing about inline packages is that you don't need to worry about the location of the external file. Both ways allow you to create objects, or import functions and constants. It gets complicated, but the workings are very simple. As a matter of fact, you can take most conventional Perl modules and rip them apart into various packages and insert them directly into your script.
I know this is over-simplified, but that is the answer I would have wanted to hear when I was first learning. I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh In reply to Re: package vs module?
by zentara
|
|