1Set::Object::Weak(3)  User Contributed Perl Documentation Set::Object::Weak(3)
2
3
4

NAME

6       Set::Object::Weak - Sets without the referant reference increment
7

SYNOPSIS

9        use Set::Object::Weak qw(weak_set);
10
11        my $set = Set::Object::Weak->new( 0, "", {}, [], $object );
12        # or
13        my $set = weak_set( 0, "", {}, [], $object );
14
15        print $set->size;  # 2 - the scalars aren't objects
16

DESCRIPTION

18       Sets, but weak.  See "weaken" in Set::Object.
19
20       Note that the "set" in "Set::Object::Weak" returns weak sets.  This is
21       intentional, so that you can make all the sets in scope weak just by
22       changing "use Set::Object" to "use Set::Object::Weak".
23

CONSTRUCTORS

25       new This class method is exactly the same as "Set::Object->new", except
26           that it returns a weak set.
27
28       weak_set( ... )
29           This optionally exported function is a shortcut for saying
30           "Set::Object::Weak->new(...)".
31
32       set( ... )
33           This method is exported so that if you see:
34
35            use Set::Object qw(set);
36
37           You can turn it into using weak sets lexically with:
38
39            use Set::Object::Weak qw(set);
40
41           Set::Object 1.19 had a bug in this method that meant that it would
42           not add the passed members into it.
43

SEE ALSO

45       Set::Object
46

CREDITS

48       Perl magic by Sam Vilain, <samv@cpan.org>
49
50       Idea from nothingmuch.
51
52
53
54perl v5.32.0                      2020-07-28              Set::Object::Weak(3)
Impressum