Gerald Richter wrote:
Hi all!
I have:
apache httpd-2.2.3
mod_perl-2.0.2
Embperl-2.2.0
where mod_perl is statically linked to httpd.
Now I try to load Embperl from httpd.conf with this directive:
PerlModule Embperl
You also need a
LoadModule embperl_module /path/to/Embperl.so
Before the PerlModule Embperl statement in your httpd.conf
Ok, but that is the tricky part to understand. I have build apache with
mod_perl dynamically the old way, i.e. _not_ DSO (mod_perl is
dynamically linked to httpd and will be linked in when the process
starts). So, my question is: why do I have to invoke LoadModule on the
Embperl module? I think this way: when httpd starts the mod_perl.so is
dynamically linked into the processpace of the httpd process. After that
has happen , the perl intepreter is a part of each apache process. (Am i
right here? Now Embperl.pm can be loaded as an ordinary perl module with
the PerlModule directive. Now its up to perl to take care of the loading
of Embperl.pm, which should happen behind the scenes (perl searches the
@INC for the Embperl.pm at compile time, or if the DynaLoader is used?).
Can anybody explain this ? I'm afraid that I don't really understand this.
If I put it this way: What does exactly static vice dynamic means when
dealing with apache/mod_perl/Embperl ? If I build mod_perl static
according to the Install document for mod_perl, then Embperl also is
static per auto, or can Embperl be dynamic within mod_perl even if
mod_perl is static built?
Regards,
Oskar Ahner
However, if I try to use this directive instead:
PerlPostConfigRequire "/home/user/startup.pl"
where startup.pl has this contents:
use Embperl;
1;
It works!
But why? As I understand it, it should not make any
difference to invoke PerlModule compared to invoke
PerlPostConfigRequire except when in time during the apache
start process processes the directive.
I guess this is only chance. It will fail sooner or later without the
LoadModule
Gerald
** Virus checked by BB-5000 Mailfilter **