RE: Using home-grown modules in mod-perl
[prev]
[thread]
[next]
[Date index for 2005/01/31]
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
 |
 |
RE: Using home-grown modules in mod-perl
Kent, Mr. John \(Contractor\) 17:15 on 31 Jan 2005
|