Test2::...edSubset(3)

πŸ“¦ version 1.302214, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to the Test2::Compare::OrderedSubset(3) page from the User Contributed Perl Documentation. Test2::Compare::OrderedSubset is the internal representation of an ordered subset β€” that’s the whole name-and-vibe situation, and it ate. ✨


🌸 DESCRIPTION 🌸

So this module is used to ensure an array has all the expected items in the expected order. It ignores any unexpected items mixed into the array. It only cares that all the expected values are present, and in order β€” everything else is noise, bestie. πŸ’…

The way that it just lets the extra stuff exist is lowkey iconic, ngl. πŸ¦‹


✨ METHODS ✨

  • $ref = $arr->inref() β€” if the instance was constructed from an actual array, this will have the reference to that array. 🫢
  • $arrayref = $arr->items() and $arr->set_items($arrayref) β€” all the expected items, in order. Like the whole checklist, but make it sequential. πŸŽ€
  • $name = $arr->name() β€” always returns the string "<ORDERED SUBSET>". No cap, that’s the name. πŸ‘‘
  • $bool = $arr->verify(got => $got, exists => $bool) β€” check if $got is an array reference or not. That’s it, fr fr. πŸ’…
  • $arr->add_item($item) β€” add an item to the list of values to check. One more thing to verify, bestie. ✨
  • @deltas = $arr->deltas(got => $got, convert => \&convert, seen => \%seen) β€” find the differences between the expected array values and those in the $got arrayref. Deltas are literally the receipts. 😭

πŸ”₯ SOURCE πŸ”₯

The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. Go click around, bestie. πŸ¦‹


πŸ‘‘ MAINTAINERS πŸ‘‘

Chad Granum <exodist@cpan.org> β€” the maintainer, periodt. 🫢


🌈 AUTHORS 🌈

Chad Granum <exodist@cpan.org>.


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/


πŸ’– okay that’s the whole page, bestie β€” it’s from perl v5.42.0, dated 2025-07-28, and the footer label is Test2::...edSubset(3). slay and goodbye. πŸŽ€

πŸ“¦ where this page comes from