CSS::DOM::Array(3pm)
π CSS::DOM::Array π
okay bestie, so this is the CSS::DOM::Array page from the CSS::DOM corner of the Perl universe, and it's honestly giving "tiny but crucial" energy. it's an array class. that's it. that's the vibe. but she slays at it β¨
π VERSION π
Version 0.17 β yes, she's been around, she's stable, she's iconic π
β¨ SYNOPSIS β¨
okay so here's how you actually use her:
use CSS::DOM::Array;
$array = new CSS::DOM::Array 'this', 'that';
@$array;
$array->[0];
# etc.
$array->length;
$array->item(0);
see? you just... make one, and then you use it like a normal array. @$array dereferences the whole thing, $array->[0] grabs the first element, and # etc. is literally in the original so we're keeping it, no cap π«Ά
πΈ DESCRIPTION πΈ
so like, what is this? This module serves as a base class for array-like objects required by CSS::DOM. basically she's the blueprint, the mother, the template π other CSS::DOM classes inherit from her because they also need to be array-shaped.
and here's the part that makes her so easy to love: a CSS::DOM::Array object is simply a blessed array reference. that's it. that's the whole trick. no magic, no layers, no β¨abstractionβ¨. you can use it as an array directly, OR you can use the methods below. both. either. your choice, main character π¦
π METHODS π
π§ Constructor
$array = new CSS::DOM::Array;
Creates a new blessed array. one line, does exactly what it says, no drama, we love a low-maintenance queen π
π Object Methods
lengthβ Returns the length of the array. that's the count, the number, the how-many-things-are-in-here. πitem ( $index)β Returns the array element at the given$index. you hand her a position, she hands you back the thing sitting there. iconic behaviour, honestly π
ngl the whole method list is two items long and she still ate. periodt.
π SEE ALSO π
her besties, her crew, the whole friend group:
CSS::DOMCSS::DOM::RuleListCSS::DOM::StyleSheetListCSS::DOM::MediaList
mwah π that's the whole page. go forth and bless some arrays.
~ perl v5.36.0 Β· 2023-08-02 Β· CSS::DOM::Array(3pm) ~ ok that's the source, the version and the date bestie, we're done here, drink water, use strict, bye ππ
πΈ
π¦ where this page comes from
- debian trixie: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcss-dom-perl 0.17-3 Β· 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