Apache-Status-DBI
view release on metacpan or search on metacpan
lib/Apache/Status/DBI.pm view on Meta::CPAN
push @s, sprintf "%sStatement: <b>%s</b>\n", $pad, $sql;
my $ParamValues = $type eq 'st' && $h->{ParamValues};
push @s, sprintf "%sParamValues: %s\n", $pad,
join ", ", map { "$_=".DBI::neat($ParamValues->{$_}) } sort keys %$ParamValues
if $ParamValues && %$ParamValues;
}
push @s, sprintf "%sAttributes: %s\n", $pad,
join ", ", map { "$_=".DBI::neat($h->{$_}) } @scalar_attr2
if @scalar_attr2;
push @s, sprintf "%sRows: %s\n", $pad, $h->rows
if $type eq 'st' || $h->rows != -1;
if (defined( my $err = $h->err )) {
push @s, sprintf "%s%s %s %s\n", $pad,
($err ? "Error" : length($err) ? "Warning" : "Information"),
$err, escape_html($h->errstr);
}
push @s, sprintf " sth: %d (%d cached, %d active)\n",
scalar @children, scalar keys %{$h->{CachedKids}||{}}, $h->{ActiveKids}
if @children;
push @s, "\n";
push @s, map { _apache_status_dbi_handle($_, $level + 1) } @children;
return @s;
}
1; # Magic true value required at end of module
__END__
=head1 NAME
Apache::Status::DBI - Show status of all DBI database and statement handles
=head1 VERSION
This document describes Apache::Status::DBI $Id: DBI.pm 9845 2007-08-16 14:13:30Z timbo $
=head1 SYNOPSIS
use Apache::Status;
use Apache::Status::DBI;
=head1 DESCRIPTION
A plugin for Apache::Status that adds a 'DBI handles' menu item to the Apache::Status page.
The DBI handles menu item leads to a page that shows all the key information
for all the drivers, database handles and statement handles that currently
exist within the process.
=head1 CONFIGURATION
The Apache::Status module must be loaded before Apache::Status::DBI.
=head1 DEPENDENCIES
DBI and Apache::Status
=head1 BUGS AND LIMITATIONS
Please report any bugs or feature requests to
C<bug-apache-status-dbi@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.
=head1 TODO
Add links to drill-down to extra level of detail for a handle.
Turn on/off profiling for a handle?
Integrate with Apache::DBI?
=head1 AUTHOR
Tim Bunce L<http://www.linkedin.com/in/timbunce>
Implemented while I was working on DBD::Gofer and DBI::Gofer::Transport::mod_perl
for L<http://Shopzilla.com>
=head1 LICENCE AND COPYRIGHT
Copyright (c) 2007, Tim Bunce C<< <Tim.Bunce@pobox.com> >>. All rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.
=head1 DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
( run in 0.888 second using v1.01-cache-2.11-cpan-5a3173703d6 )