SYNOPSIS

    # up for some HTML::ResolveLink?
    $html = HTML::RewriteAttributes::Links->rewrite($html, "http://search.cpan.org");

    # or perhaps HTML::LinkExtor?
    HTML::RewriteAttributes::Links->rewrite($html, sub {
        my ($tag, $attr, $value) = @_;
        push @links, $value;
        $value;
    });

DESCRIPTION

\*(C`HTML::RewriteAttributes::Links\*(C' is a special case of HTML::RewriteAttributes for rewriting links.

See HTML::ResolveLink and HTML::LinkExtor for examples of what you can do with this.

METHODS

You don't need to call \*(C`new\*(C' explicitly - it's done in \*(L"rewrite\*(R". It takes no arguments. See the documentation of HTML::RewriteAttributes.

Instead of a callback, you may pass a string. This will mimic the behavior of HTML::ResolveLink \*(-- relative links will be rewritten using the given string as a base \s-1URL\s0.

RELATED TO HTML::RewriteAttributes::Links…

HTML::RewriteAttributes, HTML::Parser, HTML::ResolveLink, HTML::LinkExtor

AUTHOR

Shawn M Moore, \*(C`<[email protected]>\*(C'

LICENSE

Copyright 2008-2010 Best Practical Solutions, \s-1LLC\s0. HTML::RewriteAttributes::Links is distributed under the same terms as Perl itself.