Object/Iterator.pm

filter: Statementstmt 51.7% 15 / 29 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 44.4% 4 / 9 Podpod 100% 3 / 3 totaltotal 46.8% 22 / 47 CC 4 SCAR 15.8
CC
4
Cov
43%
DESTROY
12.0
next
6.0
finish
2.0
CRAP 4.8
« Object/Metadata/Column/Interval.pm ↑ Summary Object/Metadata/Column/Blob.pm »
1 package Rose::DB::Object::Iterator;
2  
3 61 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 61 ▶use Carp();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 61 ▶use Rose::Object;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 61 our @ISA = qw(Rose::Object);
9  
10 61 our $VERSION = '0.759';
11  
12 use Rose::Object::MakeMethods::Generic
13 61 ▶(
Subroutine BEGIN: called CC=1 SCAR=0.0
14 61 scalar =>
15 [
16 'error',
17 '_count',
18 '_next_code',
19 '_finish_code',
20 '_destroy_code',
21 ],
22  
23 'boolean' => 'active',
24 61 );
25  
26 sub next
27 0 ▶{
Subroutine next: not called CC=2 SCAR=17.9
Pod documented
28 0 my($self) = shift;
29 0 my $ret = $self->_next_code->($self, @_);
30 0 ▶ $self->active(0) unless($ret);
Branch: 1 branch
BranchTrueFalseTotal
unless $ret 0 0 0
31 0 return $ret;
32 }
33  
34 sub finish
35 0 ▶{
Subroutine finish: not called CC=1 SCAR=6.9
Pod documented
36 0 my($self) = shift;
37 0 $self->active(0);
38 0 ▶ $self->_next_code(sub { 0 });
Subroutine __ANON__: not called CC=1 SCAR=6.9
39 0 return $self->_finish_code->($self, @_);
40 }
41  
42 sub DESTROY
43 0 ▶{
Subroutine DESTROY: not called CC=3 SCAR=24.8
44 0 my($self) = shift;
45  
46 0 ▶ if($self->active)
Branch: 2 branches
BranchTrueFalseTotal
if ($self->active) { } 0 0 0
elsif (my $code = $self->_destroy_code) { } 0 0 0
47 {
48 0 $self->finish;
49 }
50 elsif(my $code = $self->_destroy_code)
51 {
52 0 $code->($self);
53 }
54 }
55  
56 0 ▶sub total { shift->{'_count'} }
Subroutine total: not called CC=1 SCAR=6.9
Pod documented
57  
58 61 1;
59  
60 __END__
« Object/Metadata/Column/Interval.pm ↑ Summary Object/Metadata/Column/Blob.pm »