line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Set::Scalar::Universe; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
105
|
use strict; |
|
21
|
|
|
|
|
38
|
|
|
21
|
|
|
|
|
877
|
|
4
|
|
|
|
|
|
|
local $^W = 1; |
5
|
|
|
|
|
|
|
|
6
|
21
|
|
|
21
|
|
95
|
use vars qw($VERSION @ISA); |
|
21
|
|
|
|
|
36
|
|
|
21
|
|
|
|
|
1495
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$VERSION = '1.29'; |
9
|
|
|
|
|
|
|
@ISA = qw(Set::Scalar::Virtual Set::Scalar::Base); |
10
|
|
|
|
|
|
|
|
11
|
21
|
|
|
21
|
|
108
|
use Set::Scalar::Base qw(_make_elements); |
|
21
|
|
|
|
|
33
|
|
|
21
|
|
|
|
|
991
|
|
12
|
21
|
|
|
21
|
|
190
|
use Set::Scalar::Virtual; |
|
21
|
|
|
|
|
51
|
|
|
21
|
|
|
|
|
721
|
|
13
|
21
|
|
|
21
|
|
152
|
use Set::Scalar::Null; |
|
21
|
|
|
|
|
45
|
|
|
21
|
|
|
|
|
1080
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use overload |
16
|
21
|
|
|
21
|
|
112
|
'neg' => \&_complement_overload; |
|
21
|
|
|
|
|
53
|
|
|
21
|
|
|
|
|
190
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $UNIVERSE = __PACKAGE__->new; |
19
|
|
|
|
|
|
|
|
20
|
15
|
|
|
15
|
0
|
53
|
sub SET_FORMAT { "[%s]" } |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub universe { |
23
|
9838
|
|
|
9838
|
0
|
16142
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
9838
|
|
|
|
|
39610
|
return $UNIVERSE; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub null { |
29
|
1561
|
|
|
1561
|
0
|
2394
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
1561
|
|
|
|
|
6638
|
return $self->{'null'}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub enter { |
35
|
1
|
|
|
1
|
0
|
4
|
my $self = shift; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
2
|
$UNIVERSE = $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _new_hook { |
41
|
23
|
|
|
23
|
|
40
|
my $self = shift; |
42
|
23
|
|
|
|
|
37
|
my $elements = shift; |
43
|
|
|
|
|
|
|
|
44
|
23
|
|
|
|
|
3079
|
$self->{'universe'} = $UNIVERSE; |
45
|
23
|
|
|
|
|
409
|
$self->{'null' } = Set::Scalar::Null->new( $self ); |
46
|
|
|
|
|
|
|
|
47
|
23
|
|
|
|
|
89
|
$self->_extend( { _make_elements( @$elements ) } ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub _complement_overload { |
51
|
225
|
|
|
225
|
|
3542
|
my $self = shift; |
52
|
|
|
|
|
|
|
|
53
|
225
|
|
|
|
|
799
|
return Set::Scalar::Null->new( $self ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 NAME |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Set::Scalar::Universe - universes for set members |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SYNOPSIS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
B |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 DESCRIPTION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
There are only two guaranteed interfaces, both sort of indirect. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The first one is accessing the universe of a set: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
$set->universe |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This contains the members of the universe |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
$set->universe->members |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
of the C<$set>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The second supported interface is displaying set universes. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
print $set->universe, "\n"; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This will display the members of the set inside square brackets: [], |
85
|
|
|
|
|
|
|
as opposed to sets, which have their members shown inside |
86
|
|
|
|
|
|
|
parentheses: (). |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 AUTHOR |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Jarkko Hietaniemi |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
1; |