> > Here is a simple cgi program that runs under > registry. It uses CGI.pm > > and the Oracle modules. It would probably run > without mod_perl if I > > just changed "use Apache::DBI();" to "use DBI();". > This is one of > > those modules that has a "special" version for > mod_perl. > > Whoa, let's not start any nasty rumors here! > > As long as you place "use Apache::DBI" in your > startup.pl file (or get > it sourced any other way before DBI is sourced), you > can just use > regular "use DBI" everywhere else and you'll still > get the speed > benefit. > > If running under Apache::Registry, it makes sense to > do so, in case > you're ever down on your luck and need to go back to > true CGI > execution. >
Indeed, always write your code as if Apache::DBI isn't there (Apache Modules with Perl and C or Practical Modperl). If you don't, it puts you in a bind if Apache:DBI isn't there. If Apache::DBI is there it overrides DBI so the calls to connect do nothing if a connection already exists except return the connection. So just load Apache::DBI at startup and write "use DBI" in all your scripts. __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- 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