KiokuDB/Set/Transient.pm

filter: Statementstmt 95.2% 20 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 5 totaltotal 80.5% 29 / 36 CC 2 SCAR 2.9
CC
2
Cov
96%
includes
2.0
insert
2.0
BEGIN
1.0
CRAP 1.3
« KiokuDB/Test/Employee.pm ↑ Summary KiokuDB/Backend/Role/Query/GIN.pm »
1 #!/usr/bin/perl
2  
3 package KiokuDB::Set::Transient;
4 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 with qw(KiokuDB::Set);
11  
12 2 extends qw(KiokuDB::Set::Base);
13  
14 75 ▶sub loaded { 1 }
Subroutine loaded: called CC=1 SCAR=0.0
Pod undocumented
15  
16 0 ▶sub includes { shift->_objects->includes(@_) }
Subroutine includes: not called CC=1 SCAR=6.9
Pod undocumented
17 25 ▶sub remove { shift->_objects->remove(@_) }
Subroutine remove: called CC=1 SCAR=0.0
Pod undocumented
18 83 ▶sub members { shift->_objects->members }
Subroutine members: called CC=1 SCAR=0.0
Pod undocumented
19  
20 sub insert {
21 83 ▶ my ( $self, @objects ) = @_;
Subroutine insert: called CC=2 SCAR=6.9
Pod undocumented
22 83 ▶ croak "Can't insert non reference into a KiokuDB::Set" if grep { not ref } @objects;
Branch: 1 branch
BranchTrueFalseTotal
if grep {not ref $_;} @objects 8 75 83
23 75 $self->_objects->insert(@objects)
24 }
25  
26 2 __PACKAGE__->meta->make_immutable;
27  
28 2 __PACKAGE__
29  
30 __END__
31  
32 =pod
33  
34 =head1 NAME
35  
36 KiokuDB::Set::Transient - Implementation of in memory sets.
37  
38 =head1 SYNOPSIS
39  
40 my $set = KiokuDB::Set::Transient->new(
41 set => Set::Object->new( @objects ),
42 );
43  
44 # or
45  
46 use KiokuDB::Util qw(set);
47  
48 my $set = set(@objects);
49  
50 =head1 DESCRIPTION
51  
52 This class implements sets conforming to the L<KiokuDB::Set> API.
53  
54 These sets can be constructed by the user for insertion into storage.
55  
56 See L<KiokuDB::Set> for more details.
57  
58 =cut
59  
« KiokuDB/Test/Employee.pm ↑ Summary KiokuDB/Backend/Role/Query/GIN.pm »