Alvis::Document::Links - Perl extension for representing links


Alvis-Convert documentation  | view source Contained in the Alvis-Convert distribution.

Index


NAME

Top

Alvis::Document::Links - Perl extension for representing links occurring in documents.

SYNOPSIS

Top

 use Alvis::Document::Links;

 # Create a new instance
 my $l=Alvis::Document::Links->new();
 if (!defined($l))
 {
    die('Ugh!');
 }

 if (!$links->add($url,$anchor_txt,$type))
 {
    die("Faulty link information: " . $links->errmsg());
 }

 for my $link ($links->get())
 {
    my ($url,$anchor_text,$type)=@$link;
    # Do something with the link 
 }

DESCRIPTION

Top

A module for link information.

METHODS

Top

new()

Returns a new instance.

add($url,$anchor_txt,$type)

Adds a new link. $url and $type are mandatory.

get()

Returns all links as ([<url>,<anchor text>,<type>], [<url>,<anchor text>,<type>],...) If there is no <anchor text>, it is undef.

errmsg()

Returns a stack of error messages, if any. Empty string otherwise.

SEE ALSO

Top

Alvis::Document

AUTHOR

Top

Kimmo Valtonen, <kimmo.valtonen@hiit.fi>

COPYRIGHT AND LICENSE

Top


Alvis-Convert documentation  | view source Contained in the Alvis-Convert distribution.