WWW::Me...e::Image(3)
π WWW::Mechanize::Image(3) β like, the whole page, bestie
okay so real quick: this is the manual page for WWW::Mechanize::Image, which lives in the User Contributed Perl Documentation corner of the world, and today we're reading it together. grab a lil snack, it's short and it's cute π
β¨ NAME β¨
WWW::Mechanize::Image β it's the Image object for WWW::Mechanize. that's it, that's the vibe. an object whose whole personality is "i hold image stuff for Mech" π
πΈ VERSION πΈ
version 2.19. yes ma'am, we're on 2.19, write it down π
π¦ SYNOPSIS π¦
it's an Image object that encapsulates all the stuff that Mech needs. lowkey self-explanatory but the docs said it so i'm saying it β¨
π§ Constructor
new()
creates and returns a brand-new WWW::Mechanize::Image object. she's fresh out the box, no cap π
my $image = WWW::Mechanize::Image->new( {
url => $url,
base => $base,
tag => $tag,
name => $name, # From the INPUT tag
height => $height, # optional
width => $width, # optional
alt => $alt, # optional
attrs => $attr_ref, # optional
} );
those last four are optional, the rest are justβ¦ there. iykyk π
π Accessors
the getter girlies. one bullet each, no skipping, we love a complete list π
$image->url()β the image URL, pulled straight from thesrcattribute of the source tag. heads up though: it may beundefif the source tag has nosrcattribute. so like, don't assume, mmkay? π$image->base()β the base URL that the links are relative to.$image->name()β the name for the field, from theNAMEattribute, if there even is one.$image->tag()β the tag name. it's eitherimageorinput. those are the two options, periodt.$image->height()β the image height π$image->width()β the image width π$image->alt()β theALTattribute from the source tag, if any. accessibility icon behavior honestly π«Ά$image->attrs()β a hash ref with all the attributes and attribute values in the tag. the whole ensemble, not just the fit π$image->URI()β returns the URL as aURI::URLobject. glow-up into a real object β¨$image->url_abs()β returns the URL as an absolute URL string. no relatives allowed, we're going absolute π₯
π SEE ALSO π
go check out WWW::Mechanize and WWW::Mechanize::Link β the friend group this one rolls with π¦
π AUTHOR π
Andy Lester <andy at petdance.com> β thank you for your service, king π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2004 by Andy Lester.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, free free, fr fr π
and that's the whole page bestie π₯Ή before you go: this was the WWW::Mechanize::Image(3) page as shipped with perl v5.42.0, dated 2024-09-17, and it's literally giving "User Contributed Perl Documentation." slay, go write some Perl π
β¨πΈ
π¦ where this page comes from
- opensuse-leap 16.0: perl-WWW-Mechanize 2.190.0-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms