|
HTML::Munger - Module which simplifies the creation of web filters. |
HTML::Munger - Module which simplifies the creation of web filters.
use HTML::Munger;
$munger = new HTML::Munger; $munger->set_munger(\&filter_function); $output = $munger->munge($URL, $selfURL, $input);
HTML::Munger is a simple module which allows easy creation of web page filtering software. It was first written to build the pootifier at http://pootpoot.com/?pootify
The main task which this module performs is attempting to make all the relative links on the filtered page absolute, so that images, and hyperlinks work correctly. It also makes frames and hyperlinks properly filter back through the filter.
This leaves two major tasks for the user of HTML::Munger: fetching the original page, and building a simple munging function.
There are really only three important functions you need to know how to call in order to use this module:
<P>Hello</P><CENTER>The quick brown <I>fox</I></CENTER>
The filtering function would be called three times, with 'Hello',
'The quick brown ', and 'fox', respectively, as input. The filter function
is expected to return a string which will replace the given input in the
output of the munge() call.
Hopefully none.
J. David Lowe, dlowe@pootpoot.com
perl(1), HTML::Parser(3)
|
HTML::Munger - Module which simplifies the creation of web filters. |