File Coverage

blib/lib/Set/Scalar/Null.pm
Criterion Covered Total %
statement 26 26 100.0
branch 2 2 100.0
condition n/a
subroutine 11 11 100.0
pod 0 4 0.0
total 39 43 90.7


line stmt bran cond sub pod time code
1             package Set::Scalar::Null;
2              
3 22     22   123 use strict;
  22         40  
  22         993  
4             local $^W = 1;
5              
6 22     22   204 use vars qw($VERSION @ISA);
  22         52  
  22         1591  
7              
8             $VERSION = '1.29';
9             @ISA = qw(Set::Scalar::Base Set::Scalar::Virtual);
10 22     22   12231 use Set::Scalar::Virtual;
  22         394  
  22         1652  
11 22     22   198 use Set::Scalar::Base;
  22         45  
  22         1096  
12              
13             use overload
14 22     22   128 'neg' => \&_complement_overload;
  22         32  
  22         134  
15              
16 1     1 0 4 sub SET_FORMAT { "(%s)" }
17              
18             sub _new_hook {
19 959     959   1188 my $self = shift;
20 959         1722 my $universe = $_[0]->[0];
21            
22 959         2905 $self->universe( $universe );
23             }
24              
25             sub universe {
26 7270     7270 0 8577 my $self = shift;
27              
28 7270 100       19849 $self->{'universe'} = shift if @_;
29              
30 7270         25890 return $self->{'universe'};
31             }
32              
33             sub elements {
34 1     1 0 207 return ();
35             }
36              
37             sub size {
38 5872     5872 0 22190 return 0;
39             }
40              
41             sub _complement_overload {
42 250     250   2145 my $self = shift;
43              
44 250         846 return Set::Scalar->new( $self->universe->elements );
45             }
46              
47             =pod
48              
49             =head1 NAME
50              
51             Set::Scalar::Null - internal class for Set::Scalar
52              
53             =head1 SYNOPSIS
54              
55             B.
56              
57             =head1 DESCRIPTION
58              
59             B
60             If you want documentation see L.
61              
62             =head1 AUTHOR
63              
64             Jarkko Hietaniemi
65              
66             =cut
67              
68             1;