TEST2::COMPARE::ORDEREDSUBSET(3pm)
π NAME π
Test2::Compare::OrderedSubset β the internal representation of an ordered subset. This little icon comes from the Perl Programmers Reference Guide, and the manual page is Test2::Compare::OrderedSubset(3pm). Sheβs not doing too much β she just knows exactly what she expects. π
β¨ DESCRIPTION β¨
Okay so bestie, this moduleβs whole thing is making sure an array has all the expected items in the expected order. It ignores any unexpected items mixed into the array β not her business, not her problem π. It only cares that all the expected values are present, and in order. Everything else is just noise. Periodt. π
π METHODS π
$ref = $arr->inref()β if the instance was constructed from an actual array, this has the reference to that array. Like the original arrayβs backstage pass. ποΈ$arrayref = $arr->items()and$arr->set_items($arrayref)β all the expected items, in order.items()gives you the arrayref;set_items()sets it. Very βhereβs the lineup, donβt mess it upβ energy. β¨$name = $arr->name()β always returns the string"<ORDERED SUBSET>". No cap, thatβs the name every single time. π·οΈ$bool = $arr->verify(got => $got, exists => $bool)β checks whether$gotis an array reference or not. Thatβs the vibe check right there. π«Ά$arr->add_item($item)β adds an item to the list of values to check. One more expected value for the roster, slay. π@deltas = $arr->deltas(got => $got, convert => \&convert, seen => \%seen)β finds the differences between the expected array values and the ones in the$gotarrayref. Detective mode: on. π
π SOURCE π
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. Go browse, bestie, itβs iconic. π
π¦ MAINTAINERS π¦
Chad Granum <exodist@cpan.org>
πΈ AUTHORS πΈ
Chad Granum <exodist@cpan.org>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
Mwah π β footer vibes: perl v5.42.3, dated 2026-11-03. Stay gorgeous and keep those expected values in order, bestie π«Άπ
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms