1WWW::Mechanize::Link(3)User Contributed Perl DocumentatioWnWW::Mechanize::Link(3)
2
3
4
6 WWW::Mechanize::Link - Link object for WWW::Mechanize
7
9 version 2.11
10
12 Link object to encapsulate all the stuff that Mech needs but nobody
13 wants to deal with as an array.
14
16 new()
17 my $link = WWW::Mechanize::Link->new( {
18 url => $url,
19 text => $text,
20 name => $name,
21 tag => $tag,
22 base => $base,
23 attr => $attr_href,
24 } );
25
26 For compatibility, this older interface is also supported:
27
28 new( $url, $text, $name, $tag, $base, $attr_href )
29
30 Creates and returns a new "WWW::Mechanize::Link" object.
31
33 $link->url()
34 URL from the link
35
36 $link->text()
37 Text of the link
38
39 $link->name()
40 NAME attribute from the source tag, if any.
41
42 $link->tag()
43 Tag name (one of: "a", "area", "frame", "iframe" or "meta").
44
45 $link->base()
46 Base URL to which the links are relative.
47
48 $link->attrs()
49 Returns hash ref of all the attributes and attribute values in the tag.
50
51 $link->URI()
52 Returns the URL as a URI::URL object.
53
54 $link->url_abs()
55 Returns a URI::URL object for the absolute form of the string.
56
58 WWW::Mechanize and WWW::Mechanize::Image
59
61 Andy Lester <andy at petdance.com>
62
64 This software is copyright (c) 2004 by Andy Lester.
65
66 This is free software; you can redistribute it and/or modify it under
67 the same terms as the Perl 5 programming language system itself.
68
69
70
71perl v5.36.0 2022-07-22 WWW::Mechanize::Link(3)