Hi all,
I have a working version of a new DevPopup plugin, which should be
available on CPAN in a couple of hours. The README follows below.
Let me know what you think! Styling tips are most welcome.
Rhesa Rozendaal
NAME
CGI::Application::Plugin::DevPopup - Runtime cgiapp info in a popup
window
VERSION
Version 0.01
SYNOPSIS
End user information
This module provides a plugin framework for displaying runtime
information about your CGI::Application app in a popup window. A
sample Timing plugin is provided to show how it works:
use CGI::Application::Plugin::DevPopup;
use CGI::Application::Plugin::DevPopup::Timing;
The rest of your application follows
...
Now whenever you access a runmode, a window pops up over your
content, showing information about how long the various stages have
taken. Adding other CAP::DevPopup plugins will get you more
information.
A HTML::Tidy plugin showing you how your document conforms to W3C
standards is in the works.
Developer information
Creating a new plugin for DevPopup is fairly simple. CAP::DevPopup
registers a new callback point (named "devpopup_report"), which it
uses to collect output from your plugin. You can add a callback to
that point, and return your formatted output from there. The callback
has this signature:
sub callback($cgiapp_class, $outputref)
You pass your output to the devpopup object by calling
$cgiapp_class->devpopup->add_report(
title => $title,
summary => $summary,
report => $body
);
You are receiving $outputref, because DevPopup wants to be the last
one to be called in the postrun callback. If you had wanted to act at
postrun time, then please do so with this variable, and not through a
callback at postrun.
EXPORTS
* devpopup
This method is the only one exported into your module, and can be
used to access the underlying DevPopup object. See below for
methods that this object exposes.
METHODS
* add_report( %fields )
Adds a new report about the current run of the application. The
following fields are supported:
* title
A short title for your report
* summary
An optional one- or two-line summary of your findings
* report
Your full output
AUTHOR
Rhesa Rozendaal, "[EMAIL PROTECTED]"
BUGS
Please report any bugs or feature requests to
"[EMAIL PROTECTED]", or through the web
interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-DevPopup>.
I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
ACKNOWLEDGEMENTS
Mark Stosberg for the initial idea, and for pushing me to write it.
Sam Tregar for providing me with the skeleton cgiapp_postrun.
COPYRIGHT & LICENSE
Copyright 2005 Rhesa Rozendaal, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]