[PATCH[ Apache::DBI allow to work with mp2 after rename
[prev]
[thread]
[next]
[Date index for 2005/04/10]
This is a multi-part message in MIME format.
--------------040909000102080606060701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
FYI: Apache::DBI passes all tests on FBSD6.0-current/i386
w/bleedper w/ithreads and the latest bitkeeper checkout of mysql5.0.3a
Thanks
P.S
sorry for the cross post I wasn't quite sure where to send this one
--
END
------------------------------------------------------
Philip M. Gollucci (pgollucci@xxxxxx.xxx) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
--------------040909000102080606060701
Content-Type: text/plain;
name="mp2_rename.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mp2_rename.patch"
--- DBI.pm Sat Apr 9 22:14:03 2005
+++ DBI.pm.new Sat Apr 9 22:17:05 2005
@@ -193,8 +193,8 @@
# prepare menu item for Apache::Status
-
-Apache::Status->menu_item(
+if ($ENV{MOD_PERL_API_VERSION} == 2) {
+ Apache2::Status->menu_item(
'DBI' => 'DBI connections',
sub {
my($r, $q) = @_;
@@ -205,10 +205,25 @@
push @s, '</TABLE>';
return \@s;
}
-
-) if ($INC{'Apache.pm'} # is Apache.pm loaded?
+ ) if Apache2::Module::loaded('Apache2::Status');
+}
+else {
+ ## mp 1
+ Apache::Status->menu_item(
+ 'DBI' => 'DBI connections',
+ sub {
+ my($r, $q) = @_;
+ my(@s) = qw(<TABLE><TR><TD>Datasource</TD><TD>Username</TD></TR>);
+ for (keys %Connected) {
+ push @s, '<TR><TD>', join('</TD><TD>', (split($;, $_))[0,1]), "</TD></TR>\n";
+ }
+ push @s, '</TABLE>';
+ return \@s;
+ }
+ ) if ($INC{'Apache.pm'} # is Apache.pm loaded?
and Apache->can('module') # really?
and Apache->module('Apache::Status')); # Apache::Status too?
+}
1;
--------------040909000102080606060701--
 |
[PATCH[ Apache::DBI allow to work with mp2 after rename
Philip M. Gollucci 02:21 on 10 Apr 2005
|