Hi again Stas & Perrin, So, its a no-can-do then.
I'll keep putting the "use" in every module to import the symbols in the proper namespace. Alternatively I guess I could probably use the functions with fully qualfied name Apache::ReadConfig::myFunction(), however this would add extra typing and this is exactly what I was trying to escape from. Thanks everyone for your time and kind answers. Cheers, Lian Sebe, M.Sc. Freelance Analyst-Programmer www.programEz.net > -----Original Message----- > From: Stas Bekman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 05, 2003 7:08 PM > To: Mike P. Mikhailov > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: PerlModule options? > > > Mike P. Mikhailov wrote: > > Hello [EMAIL PROTECTED], > > > > Tuesday, August 05, 2003, 2:55:52 PM, you wrote: > > > > cfr> Hi list, > > > > cfr> One questions for the braves ;-) > > > > cfr> As I understand, the directive > > > > cfr> PerlModule Foo::Bar > > > > cfr> loads the module but doesn't import the symbols since it > is equivalent to > > cfr> the use Foo::Bar (). Therefore I should use "use Foo::Bar" > in each program > > cfr> only to make the import. > > > > cfr> Is there other way to load the module and import the > symobols specified in > > cfr> @EXPORT at mod_perl reloading time, without adding a > special line in each > > cfr> and every script using them? > > cfr> Perhaps some options passed to PerlModule though adding > (...) doesn't help > > cfr> since PerlModule expects a list of modules. > > > I think this will work > > > > <perl> > > use Foo::Bar qw ( ... whatever you want to import ... ); > > </perl> > > I think Lian was asking how to import symbols into his > scripts/handlers at the > server startup. > > Lian, you *must* put the "special line" in each and every script > you want the > symbols to be exported to, because exporting happens inside the script's > namespace, which is no main:: under Apache::Registry, but special > for each script. > > You can preload registry scripts using Apache::RegistryLoader, but this > doesn't remove the need for an explicit import. > > > __________________________________________________________________ > Stas Bekman JAm_pH ------> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com >