perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Behaviour of Apache::DBI for other applications
Date Thu, 15 Apr 2004 00:32:21 GMT

> similar to how
> Apache::DBI overloads DBI::connect(). I can't seem to derive an
> understanding of how Apache::DBI does what it does from its source.
> Is it a property of DBI itself? 

yes.  from DBI.pm:

# check if user wants a persistent database connection ( Apache + mod_perl )
if ($INC{'Apache/DBI.pm'} && $ENV{MOD_PERL}) {
    $DBI::connect_via = "Apache::DBI::connect";
    DBI->trace_msg("DBI connect via $DBI::connect_via in
$INC{'Apache/DBI.pm'}\n");
}

which is why you need to load Apache::DBI before you load DBI in your
startup.pl or whatever.

HTH

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message