Test2::...are::Bag(3)
π NAME π
Okay so this is the user-contributed Perl documentation for Test2::Compare::Bag(3) β bestie, weβre talking about Test2::Compare::Bag. Itβs the internal representation of a bag comparison. Periodt.
π¦ DESCRIPTION π¦
This module is an internal representation of a bag for comparison purposes. Thatβs the vibe: itβs a little internal comparison-bag situation, iykyk.
π METHODS π
$bool = $arr->ending/$arr->set_ending($bool)β This pair controls the ending check. Set this to true if you would like to fail when the array being validated has more items than the check. That is, if you check for4items but the array has5values, it will fail and list that unmatched item in the array as unexpected. If set to false then it is assumed you do not care about extra items. Strict bag energy versus chill bag energy, no cap.$arrayref = $arr->items()β Returns the arrayref of values to be checked in the array.$arr->set_items($arrayref)β Accepts an arrayref.
Note: that there is no validation when usingset_items, it is better to use theadd_iteminterface.
$name = $arr->name()β Always returns the string"<BAG>".$bool = $arr->verify(got => $got, exists => $bool)β Check if$gotis an array reference or not.$arr->add_item($item)β Push an item onto the list of values to be checked.@deltas = $arr->deltas(got => $got, convert => \&convert, seen => \%seen)β Find the differences between the expected bag values and those in the$gotarrayref.
π SOURCE π
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. Go off, source code.
π MAINTAINERS π
- Chad Granum
<exodist@cpan.org> - Gianni Ceccarelli
<dakkar@thenautilus.net>
β AUTHORS β
- Chad Granum
<exodist@cpan.org> - Gianni Ceccarelli
<dakkar@thenautilus.net>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
Copyright 2018 Gianni Ceccarelli <dakkar@thenautilus.net>.
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/
Bye bestie β this page is from perl v5.42.0, dated 2025-07-28. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test-Simple 1.302214-bp160.1.2 Β· Artistic-1.0 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