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

Accessors

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