Firefo...isplay(3pm)
๐ 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:
designationโ see the designation column at <https://en.wikipedia.org/wiki/List_of_common_resolutions>.usageโ see the usage column at <https://en.wikipedia.org/wiki/List_of_common_resolutions>.widthโ the width of the entire firefox window.heightโ the height of the entire firefox window.sarโ the Storage aspect ratio, which is related to the below ratios with the equationSAR = PAR/DAR. The lore: <https://en.wikipedia.org/wiki/Aspect_ratio_(image)#storage_aspect_ratio>.darโ the Display aspect ratio. <https://en.wikipedia.org/wiki/Display_aspect_ratio>.parโ the Pixel aspect ratio. <https://en.wikipedia.org/wiki/Pixel_aspect_ratio>.
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. โจ
๐ LICENSE AND COPYRIGHT ๐
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
- debian trixie: libfirefox-marionette-perl 1.63-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms