I came up with this question while I was reading Paul Dubois book MySQL
and PERL for the Web. I'm not sure I'm clear on a concept, so I'm
posting it here in pseudo perl hope of getting some clarity.
A package (module?) is created thusly:
#begin perl package
package packagename;
sub sub1 {
perl code here
}
sub sub2 {
more perl code
}
1; #return true
#end package
Now, I'm presenting two examples of how to use the package I just made
in an actual perl script. The first I know to be correct, the second is
the one I'm unclear on:
#begin example 1
use packagename;
packagename::sub1();
packagename::sub2();
#end example 1
#begin example 2
use packagename();
sub1();
sub2();
#end example 2
No can someone explain to me what, if anything is incorrect about the
second example? What I'm looking for is how sub-routines are used from
a used module without the module name prefix.
Thanks in advance,
Bruce
One day at a time... One second if that's what it takes
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]