Hello all,I'm happy to report that CGI::Application::Plugin::HtmlTidy is now on CPAN and should reach your local mirror soon. You can find it here: http://search.cpan.org/dist/CGI-Application-Plugin-HtmlTidy/
As mentioned in the README below, this release depends on a developer version of HTML::Tidy. That may make installation a bit more difficult. Definitely time to contact Andy Lester ;)
If you try it out, please let me know what you think of it!I have a minor question, not specific to cgiapp, but about packaging in general. This plugin comes with a default tidy.conf and a template for the validation report. I decided to store those with the .pm so I can locate them easily, but is this the proper way to install related non-perl files? I'd also appreciate comments on the __find_my_path function; I don't know if this is platform agnostic enough.
Thanks, and enjoy :)
Rhesa
CGI-Application-Plugin-HtmlTidy version 0.01
============================================
NAME
CGI::Application::Plugin::HtmlTidy - Add HTML::Tidy support to
CGI::Application
SYNOPSIS
use CGI::Application::Plugin::HtmlTidy;
sub cgiapp_postrun {
my ($self, $contentref) = @_;
# your post-process code here
$self->htmltidy_validate($contentref);
# or
$self->htmltidy_clean($contentref);
}
WARNING
This is the initial release. I welcome comments and discussion on the
cgiapp mailinglist. Note that it currently depends on a developer
release of HTML::Tidy (namely version 1.05_02). I hope to persuade its
author to promote that release to an official one soon.
DESCRIPTION
This plugin is a wrapper around HTML::Tidy. It exports two methods that
allow you to either validate or clean up the output of your cgiapp
application. They should be called at the end of your postrun method.
The htmltidy_validate method is a helpful addition during development.
It generates a detailed report specifying the issues with your html.
The htmltidy_clean modifies your output to conform to the W3C standards.
It has been in use for quite some time on a largish site (generating
over 100,000 pages per day) and has proven to be quite stable and fast.
Every single page view was valid html, which makes many browsers happy
:-)
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.