Set::Object::Weak(3)
okay so bestie π you just opened Set::Object::Weak(3) β that's the title, and it's chilling in the User Contributed Perl Documentation section. It's giving "sets, but make it weak" and I'm obsessed β¨
πΈ NAME πΈ
Set::Object::Weak β Sets without the referant reference increment π«Ά
π¦ SYNOPSIS π¦
use Set::Object::Weak qw(weak_set);
my $set = Set::Object::Weak->new( 0, "", {}, [], $object );
# or
my $set = weak_set( 0, "", {}, [], $object );
print $set->size; # 2 - the scalars aren't objects
π DESCRIPTION π
Sets, but weak. See weaken in Set::Object π
Note that the set in Set::Object::Weak returns weak sets. This is intentional, so that you can make all the sets in scope weak just by changing use Set::Object to use Set::Object::Weak β¨
π CONSTRUCTORS π
new
This class method is exactly the same as Set::Object->new, except that it returns a weak set. slay π
weak_set( ... )
This optionally exported function is a shortcut for saying Set::Object::Weak->new(...). iconic π¦
set( ... )
This method is exported so that if you see:
use Set::Object qw(set);
You can turn it into using weak sets lexically with:
use Set::Object::Weak qw(set);
ngl, Set::Object 1.19 had a bug in this method that meant that it would not add the passed members into it π
π₯ SEE ALSO π₯
Set::Objectβ go read this one too, bestie, it's the whole reference vibe π
π CREDITS π
Perl magic by Sam Vilain, <samv@cpan.org> β¨
Idea from nothingmuch π«Ά
that's the whole page, bestie π«Ά β brought to you by perl v5.40.2, dated 2026-05-05, and signed Set::Object::Weak(3) π
π¦ where this page comes from
- epel 10: perl-Set-Object 1.43-1.el10_3 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms