NAME
Apache::Clean - mod_perl interface into HTML::Clean
SYNOPSIS
httpd.conf:
<Location /clean>
SetHandler perl-script
PerlHandler Apache::Clean
PerlSetVar CleanLevel 3
PerlSetVar CleanOption shortertags
PerlAddVar CleanOption whitespace
</Location>
Apache::Clean is Filter aware, meaning that it can be used within Apache::Filter framework without modification. Just include the directives
PerlModule Apache::Filter
PerlSetVar Filter On
and modify the PerlHandler directive accordingly...
DESCRIPTION
Apache::Clean uses HTML::Clean to tidy up large, messy HTML, saving bandwidth. It is particularly useful with Apache::Compress for ultimate savings.
The only current configuration directive is CleanLevel, which defaults to 3. Apache::Clean will only tidy up whitespace (via $h->strip) and will not perform other options of HTML::Clean (such as browser compatibility). See the HTML::Clean manpage for details.
Only documents with a content type of "text/html" are affected - all others are passed through unaltered.
NOTES
Verbose debugging is enabled by setting $Apache::Clean::DEBUG=1 or greater. To turn off all debug information, set your apache LogLevel directive above info level.
This is alpha software, and as such has not been tested on multiple platforms or environments. It requires PERL_LOG_API=1, PERL_FILE_API=1, and maybe other hooks to function properly.
FEATURES/BUGS
No known bugs or features at this time...
SEE ALSO
perl(1), mod_perl(3), Apache(3), HTML::Clean(3), Apache::Compress(3), Apache::Filter(3)
AUTHORS
Geoffrey Young <geoff@modperlcookbook.org> Paul Lindner <paul@modperlcookbook.org> Randy Kobes <randy@modperlcookbook.org>
COPYRIGHT
Copyright (c) 2002, Geoffrey Young, Paul Lindner, Randy Kobes. All rights reserved.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
HISTORY
This code is derived from the Cookbook::Clean and Cookbook::TestMe modules available as part of "The mod_perl Developer's Cookbook".
For more information, visit http://www.modperlcookbook.org/