1WWW::Mechanize::Link(3)User Contributed Perl DocumentatioWnWW::Mechanize::Link(3)
2
3
4

NAME

6       WWW::Mechanize::Link - Link object for WWW::Mechanize
7

SYNOPSIS

9       Link object to encapsulate all the stuff that Mech needs but nobody
10       wants to deal with as an array.
11

Constructor

13       new()
14
15           my $link = WWW::Mechanize::Link->new( {
16               url  => $url,
17               text => $text,
18               name => $name,
19               tag  => $tag,
20               base => $base,
21               attr => $attr_href,
22           } );
23
24       For compatibility, this older interface is also supported:
25
26        new( $url, $text, $name, $tag, $base, $attr_href )
27
28       Creates and returns a new "WWW::Mechanize::Link" object.
29

Accessors

31       $link->url()
32
33       URL from the link
34
35       $link->text()
36
37       Text of the link
38
39       $link->name()
40
41       NAME attribute from the source tag, if any.
42
43       $link->tag()
44
45       Tag name (one of: "a", "area", "frame", "iframe" or "meta").
46
47       $link->base()
48
49       Base URL to which the links are relative.
50
51       $link->attrs()
52
53       Returns hash ref of all the attributes and attribute values in the tag.
54
55       $link->URI()
56
57       Returns the URL as a URI::URL object.
58
59       $link->url_abs()
60
61       Returns a URI::URL object for the absolute form of the string.
62
64       Copyright (c) 2004-2007 Andy Lester. All rights reserved. This program
65       is free software; you can redistribute it and/or modify it under the
66       same terms as Perl itself.
67
68
69
70perl v5.8.8                       2007-10-30           WWW::Mechanize::Link(3)
Impressum