| HTTP::Proxy::BodyFilter::htmltext - A filter to transmogrify HTML text |
HTTP::Proxy::BodyFilter::htmltext - A filter to transmogrify HTML text
use HTTP::Proxy::BodyFilter::tags;
use HTTP::Proxy::BodyFilter::htmltext;
# could it be any simpler?
$proxy->push_filter(
mime => 'text/html',
response => HTTP::Proxy::BodyFilter::tags->new,
response => HTTP::Proxy::BodyFilter::htmltext->new(
sub { tr/a-zA-z/n-za-mN-ZA-M/ }
)
);
The HTTP::Proxy::BodyFilter::htmltext is a filter spawner that
calls the callback of your choice on any HTML text (outside
<script> and <style> tags, and entities).
The subroutine should modify the content of $_ as it sees fit.
Simple, and terribly efficient.
The filter defines the following methods, called automatically:
init()begin()filter()
the HTTP::Proxy manpage, the HTTP::Proxy::BodyFilter manpage, the HTTP::Proxy::BodyFilter::htmlparser manpage.
Philippe ``BooK'' Bruhat, <book@cpan.org>.
Copyright 2003-2005, Philippe Bruhat.
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
| HTTP::Proxy::BodyFilter::htmltext - A filter to transmogrify HTML text |