On Wed, 22 Aug 2001, Matt Sergeant wrote:

> > -----Original Message-----
> > From: Michael Styer [mailto:[EMAIL PROTECTED]]
> > 
> > In Makefile.PL I have:

<snip abbreviated makefile code listing>

> I'm assuming you have more than that... :-)

Yes. :)

It actually looks like this:

    package ConfigModule;

    use ExtUtils::MakeMaker;

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

    my @directives = (
            { name         => 'ConfigDirective',
              errmsg       => 'name of the handler module',
              args_how     => 'TAKE1',
              req_override => 'RSRC_CONF'
            }
        );

    command_table(\@directives);

    # See lib/ExtUtils/MakeMaker.pm for details of how to influence
    # the contents of the Makefile that is written.
    WriteMakefile(
        ## required makefile stuff
        );

> > and in ConfigModule.pm I have:
> > 
> >     sub NewConfigDirective ($$$) {
> >         my ($cfg, $parms, $arg) = @_;
> >         $cfg->{'NewConfigDirective'} = $arg;
> >     }
> > 
> > 
> > One clue I've found as to where something might be going wrong is that
> > when I comment out the 'args_how' line in Makefile.PL and run 'perl
> > Makefile.PL' I get this error:
> > 
> >     Can't determine prototype for 
> > `ConfigModule::NewConfigDirective':  at
> >     
> > /usr/perl5/lib/site_perl/5.005/i686-linux/Apache/ExtUtils.pm line 133.
> 
> That's because ConfigModule.pm isn't loaded at the time. You'd have to
> require() it or use() it.

Even when the makefile is declared as 'package ConfigModule;' initally?
It seems strange that I would need to write 'package Foo; use Foo;'. Maybe
I don't understand how that works. Would I need a 'use lib ...' statment
there so Makefile.PL would know where to look for ConfigModule.pm?

> > So it looks as though something isn't reading ConfigModule.pm on
> > WriteMakefile or on command_table and possibly not 
> > registering the handler for the new directive, which might explain why
> > I'm getting a syntax error in the httpd.conf file when the server
> > starts. But what would be causing that to happen? I'm afraid I'm not
> > familiar enough with the MakeMaker mechanism to figure out what's
> > going on. Then again, I'm not sure that's really the problem, so
> > disregard it if you think it's a red herring.
> 
> Are you getting a ConfigModule.xs file written and compiled OK?

Yeah, there don't seem to be any problems writing and compling
ConfigModule.xs. I can get through make, make test, and make install
without any problems; it's just when it comes to starting the server that
I run into the problem.

> > Details:
> > 
> > mod_perl version used is 1.23
> 
> There have been some fairly serious config directives bugs fixed since then.
> I suggest an upgrade.

I'll look into it, but my sysadmins are worried that upgrading is going to
break, in strange and obscure ways, the multiple live commercial sites we
have running on our servers. Are there any resources available I might be
able to use to reassure them?

Thanks for your help.

-mike

-- 
Michael Styer           [EMAIL PROTECTED]
phone: 020 7603 5723    107 Shepherd's Bush Rd
fax: 020 7603 2504      London W6 7LP

Reply via email to