Tim Bunce wrote:
file: $CPAN/authors/id/T/TI/TIMB/Apache-Status-DBI-v1.0.0.tar.gz
size: 4562 bytes
md5: 15e92e4c765793ae850191f9b02e8d83
Hi Tim,
I don't seem to have commit access to this repo yet.
no rush, I'm on vacation until April 11th starting now! :)
The attached diff does this:
o Port to be mod_perl1.x and mod_perl2.x compliant
o version.pm is only distributed with 5.9.x+
so lets not require it
o fix Test::Pod::Coverage complaints for
public API documentation for apache_status_dbi_handles
o minor indentation
--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF
Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
Index: t/00.load.t
===================================================================
--- t/00.load.t (revision 9364)
+++ t/00.load.t (working copy)
@@ -1,7 +1,7 @@
use Test::More tests => 1;
BEGIN {
-use_ok( 'Apache::Status::DBI' );
+ use_ok( 'Apache::Status::DBI' );
}
diag( "Testing Apache::Status::DBI $Apache::Status::DBI::VERSION" );
Index: lib/Apache/Status/DBI.pm
===================================================================
--- lib/Apache/Status/DBI.pm (revision 9364)
+++ lib/Apache/Status/DBI.pm (working copy)
@@ -4,21 +4,27 @@
use strict;
use Carp;
-use version; our $VERSION = qv('1.0.0'); # $Id$
+our $VERSION = '1.0.1'; # $Id$
-use DBI;
+use DBI ();
use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and
$ENV{MOD_PERL_API_VERSION} >= 2 );
+
BEGIN {
- if (MP2) {
- warn "NOT TESTED WITH mod_perl2 YET - patched welcome";
- }
- else {
- }
+ if (MP2) {
+ require mod_perl2;
+ require Apache2::Module;
+ require Apache2::Util;
+ Apache2::Util->import(qw(escape_html));
+ }
+ elsif (defined $modperl::VERSION && $modperl::VERSION > 1 &&
+ $modperl::VERSION < 1.99) {
+ require Apache;
+ require Apache::Util;
+ Apache::Util->import(qw(escape_html));
+ }
}
-use Apache::Util qw(escape_html);
-
my %apache_status_menu_items = (
DBI_handles => [ 'DBI Handles', \&apache_status_dbi_handles ],
);
@@ -38,7 +44,18 @@
}
+=pod
+=over 1
+
+=item B<apache_status_dbi_handles>
+
+Displays all handles and associated information via the Apache::Status
+webpages in a running httpd mod_perl enabled server.
+
+=back
+
+=cut
sub apache_status_dbi_handles {
my($r, $q) = @_;
my @s = ("<pre>",
@@ -132,7 +149,7 @@
=head1 VERSION
-This document describes Apache::Status::DBI $Id:$
+This document describes Apache::Status::DBI $Id$
=head1 SYNOPSIS
@@ -156,10 +173,6 @@
DBI and Apache::Status
-=head1 INCOMPATIBILITIES
-
-Probably needs some trivial tweaking to work with mod_perl2.
-
=head1 BUGS AND LIMITATIONS
Please report any bugs or feature requests to
Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 9364)
+++ Makefile.PL (working copy)
@@ -11,7 +11,6 @@
PREREQ_PM => {
'Test::More' => 0,
'DBI' => 1.49,
- 'version' => 0,
# + Apache::Status or Apache2::Status
},
dist => {