Scott Scecina wrote:
I haven't been able to find an answer to this, so I thought I'd throw it
out here:
Apache::DBI used to "plugin" to Apache::Status in order to display the DBI
connections. Is this not supported in mp2?
Looks like it wasn't ported to mp2. The following patch should do the trick.
I hope Ask integrates it.
--- /tmp/DBI.pm 2004-11-05 16:09:14.779192529 -0500
+++ /tmp/DBI.pm.new 2004-11-05 16:21:03.967049395 -0500
@@ -193,9 +193,18 @@
# prepare menu item for Apache::Status
+use mod_perl;
+use constant MP2 => ($mod_perl::VERSION >= 1.99);
+my $apache_status_avail = 0;
+$apache_status_avail = 1
+ if !MP2 and $INC{'Apache.pm'} # is Apache.pm loaded?
+ and Apache->can('module') # really?
+ and Apache->module('Apache::Status'); # Apache::Status too?
+$apache_status_avail = 1
+ if MP2 and require Apache::Module
+ and Apache::Module::loaded('Apache::Status');
Apache::Status->menu_item(
-
'DBI' => 'DBI connections',
sub {
my($r, $q) = @_;
@@ -207,9 +216,7 @@
return [EMAIL PROTECTED];
}
-) if ($INC{'Apache.pm'} # is Apache.pm loaded?
- and Apache->can('module') # really?
- and Apache->module('Apache::Status')); # Apache::Status too?
+) if $apache_status_avail;
1;
--
__________________________________________________________________
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
--
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