1WWW::Mechanize::Image(3U)ser Contributed Perl DocumentatiWoWnW::Mechanize::Image(3)
2
3
4
6 WWW::Mechanize::Image - Image object for WWW::Mechanize
7
9 version 2.00
10
12 Image object to encapsulate all the stuff that Mech needs
13
15 new()
16 Creates and returns a new "WWW::Mechanize::Image" object.
17
18 my $image = WWW::Mechanize::Image->new( {
19 url => $url,
20 base => $base,
21 tag => $tag,
22 name => $name, # From the INPUT tag
23 height => $height, # optional
24 width => $width, # optional
25 alt => $alt, # optional
26 attrs => $attr_ref, # optional
27 } );
28
30 $image->url()
31 Image URL from the "src" attribute of the source tag.
32
33 May be "undef" if source tag has no "src" attribute.
34
35 $image->base()
36 Base URL to which the links are relative.
37
38 $image->name()
39 Name for the field from the NAME attribute, if any.
40
41 $image->tag()
42 Tag name (either "image" or "input")
43
44 $image->height()
45 Image height
46
47 $image->width()
48 Image width
49
50 $image->alt()
51 ALT attribute from the source tag, if any.
52
53 $image->attrs()
54 Hash ref of all the attributes and attribute values in the tag.
55
56 $image->URI()
57 Returns the URL as a URI::URL object.
58
59 $image->url_abs()
60 Returns the URL as an absolute URL string.
61
63 WWW::Mechanize and WWW::Mechanize::Link
64
66 Andy Lester <andy at petdance.com>
67
69 This software is copyright (c) 2004 by Andy Lester.
70
71 This is free software; you can redistribute it and/or modify it under
72 the same terms as the Perl 5 programming language system itself.
73
74
75
76perl v5.32.0 2020-07-28 WWW::Mechanize::Image(3)