Firefo...e::Link(3pm)

πŸ“¦
version 1.63 Β· 3 versions
, in debian trixie

okay so bestie, welcome to the Firefo...e::Link(3pm) page β€” and yes, the header literally truncates the name like that, that's not me being lazy, that's just the vibe πŸ’€. It's part of the User Contributed Perl Documentation, and it's about to be your new fave lil object.


🌸 NAME 🌸

Firefox::Marionette::Link β€” it's the object that represents a link that came out of the links method. That's the whole personality. Iconic, honestly.


✨ VERSION ✨

Version 1.63 πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole moment, copy it exactly bestie:

use Firefox::Marionette();
use v5.10;

my $firefox = Firefox::Marionette->new()->go('http://metacpan.org');;
foreach my $link ($firefox->links()) {
    if ($link->type() eq 'a') {
        say "Link to " . $link->URI();
    } elsif ($line->type() eq 'meta') {
        say "Meta name is " . $link->name();
    }
}

(no i did not add the double ;;, that's in the original, we love a little typo chaos 🫢)


πŸ’… DESCRIPTION πŸ’…

This module is a subclass of Firefox::Marionette::Element, and it was built to be compatible with WWW::Mechanize::Link. so like, it slots right in where you'd expect. periodt.


πŸ‘‘ SUBROUTINES/METHODS πŸ‘‘

πŸ“ attrs

returns the attributes for the link as a hash. all of them. the whole lil attr situation.

πŸ“ base

returns the base url that all the links are relative to.

πŸ“ name

returns the name attribute, if any. (keyword: if any β€” sometimes it's just not there, and that's okay 🌈)

πŸ“ new

accepts an element as a parameter and hands you back a link object. constructor behavior, slay.

πŸ“ tag

returns the tag β€” and it's one of: "a", "area", "frame", "iframe" or "meta". that's the whole list, no extras, don't come for me.

πŸ“ text

returns the text of the link, specifically the innerText. here's the doc link it points at, verbatim: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText.

πŸ“ url

returns the URL of the link.

πŸ“ URI

returns the URL as a URI::URL object.

πŸ“ url_abs

returns the URL as an absolute URL string. absolute. not relative. the whole thing. πŸ”₯


😭 DIAGNOSTICS 😭

None. literally nothing. silence. a peaceful little void. πŸ™ˆ


🧚 CONFIGURATION AND ENVIRONMENT 🧚

Firefox::Marionette::Link requires no configuration files and no environment variables. zero setup, just vibes ✨


πŸ’œ DEPENDENCIES πŸ’œ

Firefox::Marionette::Link requires the following non-core Perl modules:

  • URI::URL

🌈 INCOMPATIBILITIES 🌈

None reported. we're compatible, we're chill, we're thriving.


πŸ’€ BUGS AND LIMITATIONS πŸ’€

To report a bug, or to view the current list of bugs, please visit: https://github.com/david-dick/firefox-marionette/issues


πŸŽ€ AUTHOR πŸŽ€

David Dick "<ddick@cpan.org>"


Copyright (c) 2024, David Dick "<ddick@cpan.org>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.


πŸ”₯ DISCLAIMER OF WARRANTY πŸ”₯

okay bestie this next part is ALL CAPS because it is LEGALLY SERIOUS, so read it, don't skim it, it matters fr fr:

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


that's the whole page bestie, go forth and enumerate some links πŸ’–

perl v5.40.1 β€” 2025-03-16 β€” Firefo...e::Link(3pm) πŸ¦‹ (yes that's the footer, and yes i'm folding it into a cute lil sign-off instead of a boring line, iykyk)

πŸ“¦ where this page comes from