URL::Transform::using::HTML::Parser - HTML::Parse parsing of the html/xml for url transformation
my $urlt = URL::Transform::using::HTML::Parser->new( 'output_function' => sub { $output .= "@_" }, 'transform_function' => sub { return (join '|', @_) }, ); $urlt->parse_file($Bin.'/data/URL-Transform-01.html'); print "and this is the output: ", $output;
Using this module you can performs an url transformation on the HTML/XML documents.
This module is used by URL::Transform.
The url matching algorithm is taken from HTML::Parser/eg/hrefsub example script.
output_function transform_function parser_for _html_parser
Object constructor.
Requires:
output_function transform_function
Optional:
parser_for
Wrapper for transform function that can handle special cases of url-s when hidden inside an attribute. Like meta refresh:
<meta http-equiv="Refresh" content="0;http://someserver/" />
Submit document as a string for parsing.
Submit chunk of a document for parsing.
Submit file for parsing.
Jozef Kutej
To install URL::Transform, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URL::Transform
CPAN shell
perl -MCPAN -e shell install URL::Transform
For more information on module installation, please visit the detailed CPAN module installation guide.