WWW::Me...e::Link(3)

okay bestie, welcome to the manual page for WWW::Mechanize::Link β€” the page itself is WWW::Me...e::Link(3) ✨

πŸ’– NAME πŸ’–

WWW::Mechanize::Link β€” Link object for WWW::Mechanize, periodt 🫢

✨ VERSION ✨

version 2.19 β€” that's the version vibe check, no cap πŸ’…

🌸 SYNOPSIS 🌸

Link object to encapsulate all the stuff that Mech needs but nobody wants to deal with as an array. Literally it's giving "wrap it up so we don't have to touch a raw array" 😭

πŸŽ€ Constructor πŸŽ€

🌟 new() 🌟

okay so you can build one with the hashref interface:

my $link = WWW::Mechanize::Link->new( {
    url  => $url,
    text => $text,
    name => $name,
    tag  => $tag,
    base => $base,
    attr => $attr_href,
} );

For compatibility, this older interface is also supported:

new( $url, $text, $name, $tag, $base, $attr_href )

Creates and returns a new WWW::Mechanize::Link object. Slay πŸ’…

πŸ¦‹ Accessors πŸ¦‹

  • $link->url() β€” URL from the link, iykyk πŸ”—
  • $link->text() β€” text of the link, literally the words πŸ’¬
  • $link->name() β€” the NAME attribute from the source tag, if any πŸ™ˆ
  • $link->tag() β€” tag name, and it's one of: "a", "area", "frame", "iframe" or "meta" πŸ‘‘
  • $link->base() β€” base URL to which the links are relative 🌈
  • $link->attrs() β€” returns hash ref of all the attributes and attribute values in the tag, all tucked in πŸŽ€
  • $link->URI() β€” returns the URL as a URI::URL object, iconic ✨
  • $link->url_abs() β€” returns a URI::URL object for the absolute form of the string, no cap πŸ”₯

🌟 SEE ALSO 🌟

WWW::Mechanize and WWW::Mechanize::Image β€” go say hi bestie πŸ‘‹

πŸ‘‘ AUTHOR πŸ‘‘

Andy Lester <andy at petdance.com> β€” author energy πŸ’œ

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. Periodt πŸ’…

mwah πŸ’‹ β€” source/version: perl v5.42.0; date: 2024-09-17.

πŸ“¦ where this page comes from