Stas Bekman wrote:
Mark James wrote:
1. In http://perl.apache.org/docs/1.0/guide/getwet.html , use of x.x.x
for both the Apache and mod_perl version numbers made me think that
the version numbers had to be matched. Maybe y.y.y should be used
for one.
Please get used to x.x.x meaning any. Otherwise we would need to remember to use z.z.z. for php plugs in and f.f.f. when openssl is added, etc... hope you get the idea.

When they're discussed in the same sentence, and when building one requires linking to the installation or source directory of the other, I think a different variable helps.

2. In the configuration section of the 2.0 docs
(http://perl.apache.org/docs/2.0/user/intro/start_fast.html#toc_Configuration)


   it neglects to state the need to issue a directive for the mod_perl
   handler one is going to use, e.g. "PerlModule ModPerl::Registry",
   though it is covered in the configuration docs (including the
   startup-file option).


you mean preloading the module? That's not necessarily in mp2, though advisable for performance reasons.

In mp2, you can say:

PerlResponseHandler ModPerl::Registry

without:

PerlModule ModPerl::Registry

Well I just commented out "use ModPerl::Registry ()" in my startup script and it still worked. But earlier I had found that adding "PerlModule ModPerl::Registry" the http.conf was the key to getting rid of the rash of error messages I was getting on server start-up. It must have been a manifestation of some other problem, perhaps with mod_perl-1.99_08 (now using the CVS version to fix a missing OPEN in Apache::RequestRec, and to avoid the failed perlio tests), or with an older CGI.pm (found out late that CGI>=2.89 was needed).


you can also use the syntactic sugar to preload modules, by simply stating at the beginning of your mod_perl configuration 'PerlOptions +Autoload'. See
http://perl.apache.org/docs/2.0/user/config/config.html#C_AutoLoad_


or using + before the handler name:

PerlResponseHandler +ModPerl::Registry

OK, so 2.0 is not like 1.0 where PerlModule acts like use() (http://perl.apache.org/docs/1.0/guide/config.html#PerlModule_and_PerlRequire_Directives), but is more like @INC manipulation; and these handler autoload directives are an alternative to use-ing them in a start-up script.

My start-up script is very long because it calls use for
just about every package in an extensive package set.
I suppose an "import" function could be created in a master
package of package suite that when called require-ed
all the associated packages, so that mod_perl can have the
entire suite pre-loaded prior to forking through just one
line in the start-up script.

Thank you Stas for your prompt help.

Mark



Reply via email to