Firefo...isplay(3pm)

๐Ÿ“ฆ
version 1.63 ยท 2 versions
, in debian trixie

๐Ÿ’– NAME ๐Ÿ’–

Firefox::Marionette::Display โ€” the little glow-up module that represents a display, straight out of the displays method. It's giving "your screen, but make it an object." ๐Ÿ–ฅ๏ธโœจ

Oh and bestie, if you're wondering about the header up top โ€” yeah, that's the Firefo...isplay(3pm) manual page, section 3pm, from User Contributed Perl Documentation. We're not copy-pasting that line, we're just vibing with it. ๐Ÿซถ


๐ŸŒธ VERSION ๐ŸŒธ

Version 1.63 โ€” yes, the numbers are numbered, periodt.


โœจ SYNOPSIS โœจ

Okay so here's the whole entire vibe, no cap:

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

my $firefox = Firefox::Marionette->new( visible => 1, kiosk => 1 )->go('http://metacpan.org');;
my $element = $firefox->find_id('metacpan_search-input');
foreach my $display ($firefox->displays()) {
    say 'Can Firefox resize for "' . Encode::encode('UTF-8', $display->usage(), 1) . '"?';
    if ($firefox->resize($display->width(), $display->height())) {
        say 'Now displaying with a Pixel aspect ratio of ' . $display->par();
        say 'Now displaying with a Storage aspect ratio of ' . $display->sar();
        say 'Now displaying with a Display aspect ratio of ' . $display->dar();
    } else {
        say 'Apparently NOT!';
    }
}

Note the double semicolon after the go('http://metacpan.org') โ€” that's not a typo, that's canon, we reproduce it exactly. ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

This module handles the implementation of a display โ€” like, the real thing, and here's the whole list of common resolutions so you can see what we mean: <https://en.wikipedia.org/wiki/List_of_common_resolutions>.

That's it. That's the description. Short and iconic. ๐Ÿ˜Œ


๐Ÿ’… SUBROUTINES/METHODS ๐Ÿ’…

dar

returns the Display aspect ratio for the display โ€” full lore drop right here: <https://en.wikipedia.org/wiki/Display_aspect_ratio>. ๐Ÿ‘‘

designation

returns the designation value, like "VGA" or "16K" โ€” and the reference for all that is over at <https://en.wikipedia.org/wiki/List_of_common_resolutions>. Yes bestie, 16K. We're in the future.

height

returns the resolution height. Just the height. That's the whole method. Slay. ๐Ÿ“

new

okay so this one accepts a hash for the display, and here are the allowed keys, no extras, no swapsies:

par

returns the Pixel aspect ratio for the display: <https://en.wikipedia.org/wiki/Pixel_aspect_ratio>. ๐ŸŽ€

sar

returns the Storage aspect ratio, which is related to the below ratios with the equation SAR = PAR/DAR. Receipts: <https://en.wikipedia.org/wiki/Aspect_ratio_(image)#storage_aspect_ratio>.

total

returns the product of height and width. Math girlies rise up. ๐Ÿงฎโœจ

usage

returns the usage value, such as "Apple PowerBook G4". Reference material: <https://en.wikipedia.org/wiki/List_of_common_resolutions>. Yes, a whole laptop as a usage string. Obsessed. ๐Ÿ“

width

returns the resolution width. That's the entire method, and honestly? Main character energy for such a short subroutine. ๐Ÿ‘‘


๐Ÿ™ˆ DIAGNOSTICS ๐Ÿ™ˆ

None. Literally none. No drama here, bestie. ๐Ÿ˜ญ


๐ŸŒˆ CONFIGURATION AND ENVIRONMENT ๐ŸŒˆ

Firefox::Marionette::Display requires no configuration files or environment variables. Zero setup, zero stress, we love a low-maintenance module. ๐Ÿ’œ


๐Ÿงš DEPENDENCIES ๐Ÿงš

Firefox::Marionette::Display does not requires any non-core Perl modules โ€” and yes, that grammar is verbatim from the original, we keep it exactly as written, no edits, iykyk. ๐Ÿ’€


๐Ÿ’€ INCOMPATIBILITIES ๐Ÿ’€

None reported. Clean record. ๐ŸŒŸ


๐Ÿ”ฅ 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>. Go be a good citizen and file that issue with receipts. ๐Ÿซถ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

David Dick "<ddick@cpan.org>". Legend behaviour. โœจ


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 so this part is in ALL CAPS in the original and we are keeping every single word of it, because it is legally load-bearing and also, honestly, iconic in a terrifying way:

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.

bestie, please actually read that. it is not a vibe, it is a warning. ๐Ÿšจ

And that's the whole page! This one's from perl v5.40.1, dated 2025-03-16, and it lives in the Firefo...isplay(3pm) man page. Go resize something responsibly. Byeeee ๐Ÿ’…๐Ÿ’–๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from