[kw-pm] potentially dumb perl question regarding packages
Robert P. J. Day
rpjday at mindspring.com
Thu Oct 27 10:51:01 PDT 2005
some perl code i've inherited has a number of ".pl" files with the
following structure -- consider a sample file fred.pl:
=============================
#!/usr/bin/perl
...
package fred;
... executable code ...
1;
==============================
i understand the concept of defining a package name in a .pm file,
but this is just a regular executable file and it doesn't appear to
need to be part of any package.
what is the rationale for defining a package for a top-level
executable file?
rday
p.s. this file *does* "use" a number of module files, but they have
no relation to the above package name in any way.
More information about the kw-pm
mailing list