Hi,
Sorry about the late followup, just recovered from New Years. =) My
original problem was:
> I've looked in the archives and the docs, but can't seem to find an
> answer. I can't be the only one having this problem. I'm trying to
> install ApacheDBI and it goes on fine, but whenever I try and use it I
> get a compilation error:
>
> Can't locate object method "module" via package "Apache" at
> /usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.
>
> Sure enough, as far as I can tell Apache.pm or any of it's base classe's
> don't implement sub module, so I'm not sure how this should work in
> Apache::DBI:
>
> 202: ) if ($INC{'Apache.pm'} and Apache->module('Apache::Status'));
>
> (which looks like a nice feature, being able to see the status). Once I
> comment out this block everything works fine. I have mod_perl 1.21
> installed and running fine.
>
> Any ideas?
Edmund suggested:
> > are you trying to use it from the command-line ?
> > this won't work, you can only use it running with
> > apache/mod_perl.
This was the problem. I had a syntax error in my startup.pl file, and
when I ran perl -c startup.pl I got:
hits:~/batch# perl -c startup.pl
Can't locate object method "module" via package "Apache" at
/usr/lib/perl5/site_perl/5.005/Apache/DBI.pm line 202.
BEGIN failed--compilation aborted at startup.pl line 9.
hits:~/batch#
So I thought the problem was with Apache::DBI. Of course, the problem
was somewhere else, and once that was fixed, apache started up (even
though perl -c gave the same error).
Perhaps it would be worthwhile making Apache::DBI compile ok when not
run under mod_perl?
Cheers,
Alex