RE: Using home-grown modules in mod-perl

[prev] [thread] [next] [Date index for 2005/01/31]

From: Kent, Mr. John \(Contractor\)
Subject: RE: Using home-grown modules in mod-perl
Date: 17:15 on 31 Jan 2005
Leo,

I am not using OO coded modules.  My  modules=20
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();  =20

and not use EXPORT?

Thank you,
John Kent

-----Original Message-----
From: Leo [mailto:leo-mod-perl@xxxxxxx.xxx.xx]
Sent: Monday, January 31, 2005 8:37 AM
To: Jonathan Vanasco; modperl@xxxx.xxxxxx.xxx
Subject: Re: Using home-grown modules in mod-perl


Jonathan Vanasco wrote:

> On Jan 31, 2005, at 10:55 AM, Kent, Mr. John ((Contractor)) wrote:
>
>> will it work to NOT use EXPORT and say in the startup
>>
>> /use/lib qw (/users/webuser/homegrown/lib);
>> use MyModule();
>
>
> That's what I do.
>
>
>

Does your module work with a blessed references, or it a module=20
containing methods?

The above declaration is for OO coded modules that utilize blessed=20
references.

If your module doesn't use blessed references you should try using =
Exporter.

Exporter pollutes the module namespace a bit so maybe it isn't such a=20
purist thing to use but the alternative is to call a method explicitly=20
like: MyModule::foo(...)

    perldoc Exporter

Leo

Using home-grown modules in mod-perl
Kent, Mr. John \(Contractor\) 15:55 on 31 Jan 2005

Re: Using home-grown modules in mod-perl
Jonathan Vanasco 16:09 on 31 Jan 2005

RE: Using home-grown modules in mod-perl
Kent, Mr. John \(Contractor\) 17:15 on 31 Jan 2005

RE: Using home-grown modules in mod-perl
Steven Lembark 17:20 on 31 Jan 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52