Howdy all -

I've been trying to install apache-1.3.20/mod_perl-1.26 along with a 
whole pile of custom modules I use. I have no less than eight other 
installations running this same configuration (although the reference 
platform is apache-1.3.19/mod_perl-1.25) and none of them have this 
problem I'm running into.

I have a module that defines several 'first class' apache directives 
called 'Toolbox::Apache::Config.pm'. My other installations have NO 
problem with this module, but when I try to load the thing in my 
freshly compiled and installed httpd my config directives are flagged 
as invalid. This module was originally written using my (EXTREMELY 
dog-eared - thanks Lincoln and Doug!) Eagle book for reference, and 
it appears that the mechanism has been streamlined in recent releases 
of mod_perl. Namely, using the Apache::ModuleConfig()  mechanism is 
the 'new' method of handling these directives rather than the 'older' 
methods. Additionally, upon scrounging through mailing lists and the 
guide, I discovered that newer versions of mod_perl prefer using 
"PerlModule Toolbox::Apache::Config" in the config file rather than 
"use Toolbox::Apache::Config;" in the startup.pl file. Upon changing, 
I get segfaults...

I tried re-writing my module using the (newer) method discussed in 
the guide, and upon run I get undefined versions on the PerlModule 
line. I'm at a loss at this point and have been tearing my hair out 
for more than three days... Am I just missing something so obvious 
I'll look like an ass or did something fundamental change here that 
I'm not seeing (or finding on the guild/mailing lists)?

========================
Makefile.PL
========================
package Toolbox::Apache::Config;

use ExtUtils::MakeMaker;
use Apache::ExtUtils qw (command_table);
use Apache::src();

my @directives = (
        {
                name => 'Debug',
                errmsg => 'On or Off',
                args_how => 'FLAG',
                req_override => 'OR_ALL',
        },
        ... etc ...
);

command_table(\@directives);


# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
     'NAME'     => 'Toolbox::Apache::Config',
     'VERSION_FROM' => 'Config.pm', # finds $VERSION
     'LIBS'     => [''],   # e.g., '-lm'
     'DEFINE'   => '',     # e.g., '-DHAVE_SOMETHING'
     'INC'      => Apache::src->new->inc,     # e.g., '-I/usr/include/other'
     'DIR' => [qw()],
     'NORECURS'  => 1,
);

__END__


==================
Config.pm
==================
package Toolbox::Apache::Config;

use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader);
@EXPORT = qw();
$VERSION = do{my@r=q$Revision: 1.2 $=~/\d+/g;sprintf '%02d.'.'%02d'x$#r,@r};

if( $ENV{MOD_PERL} ){
        bootstrap Toolbox::Apache::Config $VERSION;
}


sub Debug($$$){
        my($cfg,$parms,$arg) = @_;
        $cfg->{Debug} = $arg;
}
... etc ...
1;
__END__


==================
startup.pl
==================
#!/usr/bin/perl

BEGIN{
        use Apache ();
        use lib '/usr/local/radt/lib';
}

use Apache::Constants();
use Util::Core;
use Toolbox::Apache::Config;
1;


==================
perl.conf (called from httpd.conf)
==================
PerlWarn on
PerlRequire conf/startup.pl
PerlChildInitHandler Toolbox::Apache::ToolboxInit


==================
# perl -V
==================
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
   Platform:
     osname=linux, osvers=2.4.5, archname=i586-linux
     uname='linux tipper.jollygreen.com 2.4.5 #3 wed may 30 11:17:49 
pdt 2001 i586 unknown '
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef useperlio=undef d_sfio=undef
   Compiler:
     cc='cc', optimize='-O2', gccversion=2.95.2 19991024 (release)
     cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
     ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
     stdchar='char', d_stdstdio=undef, usevfork=false
     intsize=4, longsize=4, ptrsize=4, doublesize=8
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     alignbytes=4, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt
     libc=, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
   Built under linux
   Compiled at Aug 30 2001 10:38:02
   @INC:
     /usr/lib/perl5/5.00503/i586-linux
     /usr/lib/perl5/5.00503
     /usr/lib/perl5/site_perl/5.005/i586-linux
     /usr/lib/perl5/site_perl/5.005
========================================================
==             GIANT Network Productions              ==
==   web hosting   +   web design   +   consulting    ==
========================================================
++  541 . 684 . 9798       http://www.jollygreen.com/ ++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Reply via email to