I have no idea what you're really asking, but when you do "use module;" that module will only export it's functions to the callers namespace. So the functions from that module will only be available, in the unqualified form, to whichever package directly uses that module. Note you can still access any function you want via the "Package::Function()" syntax. | [reply] |
If I understand your question correctly, library is a file which contains a bunch of Perl statements and functions. You also have a bunch of Perl scripts that use library. You have another module that you want to make available to both library and your Perl scripts.
Part of what confused the earlier respondents is that Perl libraries usually have the extension ".pm". Many older applications, especially those from Perl4, don't. *shrugs*
The short answer is that you have to put your use statement within every package that you wish to have the symbols available.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
| [reply] |
I'm a bit confused. When you use the term "shared library", are you talking about a compiled library on your system, such as a ".a" or ".dll" file? Perl modules are modules, no matter if they are "shared" or not.
Also, since you provided no source with your question, my answer is, "It depends." If the two modules are Exporters and the functions you want to call are all exported through to your program, then, yes, you would only need to use your funlittlemodule. Otherwise, you may need both modules. Unfortunately, I have so little to go on, I can't say for sure.
In the meantime, post some code and read perldoc perlmod.
| [reply] [d/l] [select] |