As you can see at the attached below correspondance, some people try to 
use Apache::compat without having mod_perl 1.0 installed, and things 
don't work as expected. So at least this patch hints on how to solve the 
problem.

Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.61
diff -u -r1.61 compat.pm
--- lib/Apache/compat.pm        4 Jun 2002 12:40:53 -0000       1.61
+++ lib/Apache/compat.pm        25 Jun 2002 15:17:56 -0000
@@ -91,7 +91,8 @@
  }

  sub module {
-    require Apache::Module;
+    eval { require Apache::Module };
+    die "Please install Apache::Module from CPAN" if $@;
      return Apache::Module::loaded($_[1]);
  }



-------- Original Message --------
Subject: Re: Apache::DBI with mod_perl 2.0
Date: Tue, 25 Jun 2002 23:02:10 +0800
From: Stas Bekman <[EMAIL PROTECTED]>
To: Zac Morris <[EMAIL PROTECTED]>


Zac Morris wrote:
 > Yeah, so I've tried these suggestions:
 >
 >     use Apache2();
 >     use Apache::compat;
 >
 > and I'm still getting the errors:
 >
 > Undefined subroutine &Apache::Module::loaded called at
 > /usr/lib/perl5/site_perl/5.6.1/i386-linux/Apache/compat.pm line 95.
 > Compilation failed in require at ./db_connect_test.pm line 38.
 > BEGIN failed--compilation aborted at ./db_connect_test.pm line 38.

Apache::Module is not a part of the mod_perl 1.0 core, unfortunately you
have to install it to get this thing working. We will see if there is a
better solution for this kludge.

 > I think this boils down to something Per said earlier, I've never 
installed
 > mod_perl1 only mod_perl2 on an apache 2 server...

you cannot install mod_perl 1.0 with apache 2 server. You probably mean
within the same perl libs install, since you can have both versions
reside under the same perl installation.

 > As I understand it the "use Apache::compat" just allows your script to
 > utilize the mod_perl1 modules correct?

mod_perl 1.0's third party modules, yes.


-- 


__________________________________________________________________
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

-- 


__________________________________________________________________
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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to