You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@perl.apache.org by Jim Martinez <jj...@bigbigorg.org> on 2005/02/16 21:21:21 UTC
preload modules at sever startup
Hi,
I'm looking for some suggestions for a library problem with Apache::Test,
which I'm using to develop a web application.
Hope this is the place to ask.
Using Apache 1 and Mod perl 1, how can I preload perl modules at server
startup?
My extra.conf.in contains something like this:
PerlModule Foo::Bar
<Location /a >
SetHandler perl-script
PerlHandler Foo::Bar::myhandler
</Location>
"make test" fails to start apache. The apache server won't start because
it can't find Foo::Bar, needed by the line "PerlModule Foo::Bar"
In the link below, I read about "PerlSwitches -I@ServerRoot@/../lib"
http://perl.apache.org/docs/general/testing/testing.html#Extending_Configuration_Setup
Is PerlSwitches for MP2 only?
In the link above I'd call the root development directory
/path/to/Apache-Amazing, just so that you understand what I mean by root
development directory. Here is a listing of the root development
directory:
CVS/ Changes MANIFEST MANIFEST.OLD MANIFEST_maybe META.yml Makefile
Makefile.PL README blib/ docs/ lib/ pm_to_blib t/
Of course Foo::Bar is in lib/Foo/Bar.pm (until Apache::Test moves it to
blib/ )
If I set PERL5LIB to the root development directory, the "make test" runs
fine (well it shows me my programming errors is what I mean).
Should I create a starup.pl file that does something like:
BEGIN { use lib @ServerRoot@../lib }
Then and add lines to extra.conf.in to run startup.pl.
Or add a <perl> directive to extra.conf.in like:
<Perl>
use lib '@ServerRoot@/../blib/lib'
</Perl>
Or is there a better way? A hard coded path won't work in my situation
(which is why I use the @ServerRoot@).
Thanks in advance,
Jim
Re: preload modules at sever startup
Posted by Stas Bekman <st...@stason.org>.
Jim Martinez wrote:
>>I know this list shift was/is confusing, though, so no problem.
>>hopefully we'll get archives for this list soon - marc has yet to put
>>them up.
>
>
> At the bottom of this testing html page:
>
> http://perl.apache.org/docs/general/testing/testing.html
>
> there is a boilerplate like comment "Have comments? Please send them to
> the modperl users mailing list." that links to:
>
> http://perl.apache.org/maillist/modperl.html
>
> Maybe instead it should point to:
> http://perl.apache.org/maillist/test-dev.html
>
> Or if changing that link, which looks like a footer, is difficult, maybe
> there should be a mention of the test-dev list which links to the
> test-dev.html page.
Thanks for the suggestion, Jim.
I've added this section:
http://perl.apache.org/docs/general/testing/testing.html#Got_a_question_
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: preload modules at sever startup
Posted by Jim Martinez <jj...@bigbigorg.org>.
On Feb 16 Geoffrey Young wrote:
>
>
> Jim Martinez wrote:
> > Hi,
> >
> > I'm looking for some suggestions for a library problem with Apache::Test,
> > which I'm using to develop a web application.
>
> uh... you asked this question last week on test-dev@httpd.apache.org and
> I answered you:
I didn't receive a reply, so I thought it was yet another item that
slipped past the ethernet into the ether. Sorry for the double post.
>
> http://marc.theaimsgroup.com/?t=110797072000007&r=1&w=2
>
I read it. Thanks Geoff.
> I know this list shift was/is confusing, though, so no problem.
> hopefully we'll get archives for this list soon - marc has yet to put
> them up.
At the bottom of this testing html page:
http://perl.apache.org/docs/general/testing/testing.html
there is a boilerplate like comment "Have comments? Please send them to
the modperl users mailing list." that links to:
http://perl.apache.org/maillist/modperl.html
Maybe instead it should point to:
http://perl.apache.org/maillist/test-dev.html
Or if changing that link, which looks like a footer, is difficult, maybe
there should be a mention of the test-dev list which links to the
test-dev.html page.
Jim
Re: preload modules at sever startup
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Jim Martinez wrote:
> Hi,
>
> I'm looking for some suggestions for a library problem with Apache::Test,
> which I'm using to develop a web application.
uh... you asked this question last week on test-dev@httpd.apache.org and I
answered you:
http://marc.theaimsgroup.com/?t=110797072000007&r=1&w=2
I know this list shift was/is confusing, though, so no problem. hopefully
we'll get archives for this list soon - marc has yet to put them up.
anyone running an archive care to start compiling posts? thanks.
--Geoff