Lupe Christoph wrote: > On Thursday, 2002-08-08 at 15:48:48 -0700, John E. Mendenhall wrote: > >>On Thu, 8 Aug 2002, Lupe Christoph wrote: > > >>>Since mod_perl seems to play tricks with bootstrap, I don't really >>>know how this comes into play. >> > >>I have done all you have asked. All output appears similar. Three files, >>including Log.xs. Nine entries in httpd for XS_Apache__Log, as follows: > > >>So, where to from here? Any ideas? > > > Well, this proves that Apache::Log *is* linked into the httpd binary. > The questions is why bootstrap is called at all. I'm afraid, I have > to hand this over to people who know the internal logic of mod_perl. > bootstrap *should* not be called, I think.
bootstrap() is always needed, because that's the function that "installs" XSUBs into the corresponding Perl functions. The only difference between dynamically and statically linked libraries is the former is loading the object first and the latter have everything loaded already. Here is the explanation by Tim Bunce: http://groups.google.com/groups?q=bootstrap+statically+linked+perl&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Cyy1rA.Lnp%40ig.co.uk&rnum=1 So as Tim says a statically linked library should already have its ::bootstrap function (which is boot_Apache__Log in your case). mod_perl::boot() (lib/mod_perl.pm) is the place where it decides whether to call DynaLoader's bootstrap() or the existing one: sub boot { my($class, $version) = @_; no strict 'refs'; *{$class.'::dl_load_flags'} = DynaLoader->can('dl_load_flags'); if ($ENV{MOD_PERL}) { (defined &{$class.'::bootstrap'} ? \&{$class.'::bootstrap'} : \&DynaLoader::bootstrap)-> ($class, $version); } } In your case defined &{$class.'::bootstrap'} should probably return a ref to Apache::Log::bootstrap() (boot_Apache__Log) and then call it. For some reason this doesn't happen and the DynaLoader's version is called, which of course fails to load the object. What do you get from running: nm httpd | grep Apache__Log there should be boot_Apache__Log there. __________________________________________________________________ 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