B
Bart Van der Donck
Hello,
My main program calls this module:
use DBI;
Then it calls another module (one of myself), using this code:
use lib '/path/to/my/module/';
use NameOfMyModule;
Inside NameOfModule.pm, I want to execute commands that need the
previously loaded DBI.pm. However it fails, saying that DBI.pm isn't
loaded. Which could be solved quickly by invoking DBI.pm again from
within NameOfModule.pm.
This works fine. But the waste of memory is considerable because I
have tens of own modules like NameOfMyModule that are invoked from the
main program. Most of them need DBI.
I looked at some stuff to solve this, looks as if something like
Exporter.pm is available for this kind of things. But then I would
need to load Exporter from within all my own modules. Which would be
about the same as loading DBI each time.
Any hints?
Thank you,
Bart
My main program calls this module:
use DBI;
Then it calls another module (one of myself), using this code:
use lib '/path/to/my/module/';
use NameOfMyModule;
Inside NameOfModule.pm, I want to execute commands that need the
previously loaded DBI.pm. However it fails, saying that DBI.pm isn't
loaded. Which could be solved quickly by invoking DBI.pm again from
within NameOfModule.pm.
This works fine. But the waste of memory is considerable because I
have tens of own modules like NameOfMyModule that are invoked from the
main program. Most of them need DBI.
I looked at some stuff to solve this, looks as if something like
Exporter.pm is available for this kind of things. But then I would
need to load Exporter from within all my own modules. Which would be
about the same as loading DBI each time.
Any hints?
Thank you,
Bart