Lee ♫ Goddard > HTML-LinkAdd-0.12 > HTML::LinkAdd

Download:
HTML-LinkAdd-0.12.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.12   Source  

NAME ^

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

DESCRIPTION ^

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.

DEPENDENCIES ^

        strict
        warning
        HTML::TokeParser

CONSTRUCTOR (new) ^

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.

PUBLIC output

A string of HTML output.

PRIVATE INPUT

A string of HTML input.

PUBLIC METHOD hyperlink ^

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

PUBLIC METHOD save ^

Saves the object's output slot to filename passed as scalar.

Returns undef on failure, 1 on success.

SYNOPSIS ^

        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');

CAVEATS ^

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

TODO ^

AUTHOR ^

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

COPYRIGHT ^

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.