NAME
Plack::Middleware::Debug::Base - Base class for Debug panels
SYNOPSIS
# None. You shouldn't need to use this class yourself.
DESCRIPTION
This is the base class for panels.
METHODS
new
-
Constructs a new object and calls
init()
. init
-
Called by
new()
, this method is empty in this class, but can be overridden by subclasses. should_run
-
When a panel class is loaded by Plack::Middleware::Debug, its
should_run()
class method is called to see whether that panel wants to be included in every request and response. For example, the panel might decide to be run if some prerequisite module cannot be loaded.This method defaults to
1
in this base class. process_request
-
The debug middleware calls all enabled panels when a request has arrived. The first and only argument of this method is the environment hash. In this base class it is an empty method. Not every panel will need to override it; some might only need to override
process_response()
. process_response
-
The debug middleware calls all enabled panels when a response has arrived. The method is called with the response array first and the environment hash second. In this base class it is an empty method. Not every panel will need to override it; some might only need to override
process_request()
. dom_id
-
This is the class name used for HTML tags related to that panel. It defaults to
plDebugXXXPanel
whereXXX
is the base name of the panel package. For example, for theEnvironment
panel, it will beplDebugEnvironmentPanel
. url
-
This is the URL that is invoked when clicking on the panel's entry in the toolbar. It defaults to
#
, which means that the panel is implemented on the same HTML page.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests through the web interface at http://rt.cpan.org.
INSTALLATION
See perlmodinstall for information and options on installing Perl modules.
AVAILABILITY
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you. Or see http://search.cpan.org/dist/Plack-Middleware-Debug/.
The development version lives at http://github.com/hanekomu/plack-middleware-debug/. Instead of sending patches, please fork this project using the standard git and github infrastructure.
AUTHORS
Marcel Grünauer, <marcel@cpan.org>
Tatsuhiko Miyagawa, <miyagawa@bulknews.net>
COPYRIGHT AND LICENSE
Copyright 2009 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.