On Thu, Mar 29, 2001 at 10:11:39PM -0700, Bolt Thrower wrote:
> Victor Michael Blancas wrote:
> >
> > >
> > > So how am I supposed to install Apache::AuthCookieDBI via the CPAN
> > > shell?
> > >
> > > Thanks,
> > >
> >
> > `perl -MCPAN -e "install Apache::AuthCookieDBI"`
> >
Apache::DBI has been annoyignly refusing to compile outside a mod_perl environnement.
The following small patch would get around that annoying dependency. I've been using
a patched version of Apache::DBI like this one for some time now.
> Yes, that was the implied first step that was giving me trouble in the
> first place, and the reason for my initial message. I like using the
> CPAN shell to install my perl modules, but I suppose all the Apache
> modules I try to install that rely on Apache::DBI will fail their
> respective tests. So, the above command should probably be amended to:
> perl -MCPAN -e "force install Apache::AuthCookieDBI"
> and hope I don't miss anything important by ignoring the test runs.
> --
> Steve Chadsey <[EMAIL PROTECTED]>
> Now playing: Yearning The Seeds Of A New Dimension
> (In The Woods... - "Heart Of The Ages")
>
>
--
? .DBI.pm.swp
Index: DBI.pm
===================================================================
RCS file: /home/cvs/local/perl/Apache-DBI/DBI.pm,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 DBI.pm
--- DBI.pm 2001/03/30 05:43:33 1.1.1.1
+++ DBI.pm 2001/03/30 05:53:26
@@ -1,6 +1,13 @@
package Apache::DBI;
-use Apache ();
+BEGIN
+ {
+ if( (exists $ENV{'MOD_PERL'}) && ($ENV{'MOD_PERL'}))
+ {
+ eval "use Apache;";
+ }
+ }
+
use DBI ();
use strict;
Index: test.pl
===================================================================
RCS file: /home/cvs/local/perl/Apache-DBI/test.pl,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 test.pl
--- test.pl 2001/03/30 05:43:33 1.1.1.1
+++ test.pl 2001/03/30 05:53:26
@@ -1,3 +1,20 @@
-#!/usr/local/bin/perl
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl test.pl'
-print "\nsorry, no test sequence available.\n";
+######################### We start with some black magic to print on failure.
+
+# Change 1..1 below to 1..last_test_to_print .
+# (It may become useful if the test is moved to ./t subdirectory.)
+
+BEGIN { $| = 1; print "1..1\n"; }
+END {print "not ok 1\n" unless $loaded;}
+use Apache::DBI;
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# Insert your test code below (better if it prints "ok 13"
+# (correspondingly "not ok 13") depending on the success of chunk 13
+# of the test code):
+
PGP signature