You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/06/21 12:14:32 UTC

Re: Can't locate object method "module" via package "Apache"

On Thu, 21 Jun 2001, Surat Singh Bhati wrote:

> I am getting the following error in my strartup.pl
>
> perl -cx startup.pl
> Can't locate object method "module" via package "Apache" at
> /usr/local/lib/perl5
> /site_perl/5.6.0/Apache/DBI.pm line 202.
> Compilation failed in require at startup.pl line 11.
>
> Line 11 of startup.pl
> 	11   use Apache::DBI();
>
> Line 202 of DBI.pm
> 	202  ) if ($INC{'Apache.pm'} and Apache->module('Apache::Status'));
>
> Can you pelase tell me the possible cause of this error.
> Apache::DBI is up to date as perl CPAN.

this is fine. You are not running in mod_perl environment. A possible
remedy is to:

if ($ENV{MOD_PERL}){
 # put all the staff that requires mod_perl in here
 # e.g. Apache::DBI
}

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/