WWW::Mechanize::Link(3pm)

WWW::Mechanize::Link3pm

Link object for www::mechanize

Usage

Link object to encapsulate all the stuff that Mech needs but nobody wants to deal with as an array.

Version

version 2.22

Constructor

new()

    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.

Accessors

$link->url()

URL from the link

$link->text()

Text of the link

$link->name()

NAME attribute from the source tag, if any.

$link->tag()

Tag name (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.

$link->URI()

Returns the URL as a URI::URL object.

$link->url_abs()

Returns a URI::URL object for the absolute form of the string.

Releases

12 releases since Debian 3.1 (Sarge); the text changed 11 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11
  10. 12
  11. 13
  12. Arch

Author

Andy Lester <andy at petdance.com>

From perl-www-mechanize 2.22-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.