1HTML::RewriteAttributesU:s:eLrinCkosn(t3r)ibuted Perl DoHcTuMmLe:n:tRaetwirointeAttributes::Links(3)
2
3
4

NAME

6       HTML::RewriteAttributes::Links - concise link rewriting
7

SYNOPSIS

9           # up for some HTML::ResolveLink?
10           $html = HTML::RewriteAttributes::Links->rewrite($html, "http://search.cpan.org");
11
12           # or perhaps HTML::LinkExtor?
13           HTML::RewriteAttributes::Links->rewrite($html, sub {
14               my ($tag, $attr, $value) = @_;
15               push @links, $value;
16               $value;
17           });
18

DESCRIPTION

20       "HTML::RewriteAttributes::Links" is a special case of
21       HTML::RewriteAttributes for rewriting links.
22
23       See HTML::ResolveLink and HTML::LinkExtor for examples of what you can
24       do with this.
25

METHODS

27   "new"
28       You don't need to call "new" explicitly - it's done in "rewrite". It
29       takes no arguments.
30
31   "rewrite" HTML, (callback|base)[, args] -> HTML
32       See the documentation of HTML::RewriteAttributes.
33
34       Instead of a callback, you may pass a string. This will mimic the
35       behavior of HTML::ResolveLink -- relative links will be rewritten using
36       the given string as a base URL.
37

SEE ALSO

39       HTML::RewriteAttributes, HTML::Parser, HTML::ResolveLink,
40       HTML::LinkExtor
41

AUTHOR

43       Shawn M Moore, "<sartak@bestpractical.com>"
44

LICENSE

46       Copyright 2008-2010 Best Practical Solutions, LLC.
47       HTML::RewriteAttributes::Links is distributed under the same terms as
48       Perl itself.
49
50
51
52perl v5.32.0                      2020-07-28 HTML::RewriteAttributes::Links(3)
Impressum