
HTML::LinkAdd - add hyperlinks to phrases in HTML documents

A simple object that accepts a class reference, a path to a file, and a hash of text-phrase/link-URLs, and supplies a method to hyperlink the supplied phrases to the supplied URLs, and a method to save the file.

strict
warning
HTML::TokeParser

Accepts class reference, some HTML, and a hash of phrases and hyperlinks. The HTML may be a filename passed as a scalar, or a reference to a scalar thast is literal HTML.
Returns a scalar that is the updated HTML input.
A string of HTML output.
A string of HTML input.

Returns the hyperlinked HTML docuemnt constructed by...the constructor.

Saves the object's output slot to filename passed as scalar.
Returns undef on failure, 1 on success.

use HTML::LinkAdd;
my $page = new HTML::LinkAdd('testinput1.html',
{'the clocks were striking thirteen'=>'footnotes.html#OrwellG-1'}
);
warn $page -> hyperlinked;
$page ->save ('output.html');

Is only as limited as HTML::TokeParse (see HTML::TokeParse).

ID.
Lee Goddard lgoddard@cpan.org 01/05/2001 London, UK

Copyright (C) Lee Goddard. All Rights Reserved. This is free software and you may use, abuse, amend and distribute under the same terms as Perl itself.