Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Imported subroutinesby Laurent_R (Canon) |
on Sep 16, 2013 at 21:50 UTC ( [id://1054338]=note: print w/replies, xml ) | Need Help?? |
I may be wrong, but my understanding is that when you use or require a module, Perl is compiling the whole module anyway, including the subroutines which are not exported, so that the only difference between exporting or not exporting a function (putting its name in @EXPORT or @EXPORT_OK) would really be updating the program namespace, which probably is not measurable. The fact that you don't export a subroutine does not mean that you don't use it, it only means that it is not intended to be used directly by the main program, but it may very well be used internally by other functions of the same module. Is this view wrong? Am I missing something?
In Section
Seekers of Perl Wisdom
|
|