Kent, Mr. John (Contractor) wrote:

Leo,

I am not using OO coded modules. My modules contain methods.

Other routines call this module's routines as you indicated:

In order to solve other mod-perl problems I followed Stas's recommendation
to call all my routines thusly:

MyModule::foo(...)

So, since I am doing it this way I should use in my startup:

/use/lib qw (/users/webuser/homegrown/lib);
use MyModule();


and not use EXPORT?

Thank you,
John Kent



I didn't follow your thread with Stas.

How are you calling the methods contained in MyModule?

Exporter may be something you need to use in MyModule.pm (within your homegrown directory)

I have written several such modules (function only libraries that perform simple straight forward tasks that don't require all the OO stuff) and they work fine in mod_perl. This is not a mod_perl specific question.

Take a look at:

man perlmod for details about using modules in perl. There are many tips about how to get your methods exported.

Is use a BEGIN block right after my use declarations

BEGIN {
use Exporter;
use vars qw(VERSION ISA EXPORT);
$VERSION = '0.1';
@ISA = qw(Exporter);
@EXPORT = qw(<insert space delimited list of method names to export by default>);
}


...

Leo

Reply via email to