blib/lib/App/RecordStream/Clumper/Key/WrappedCallback.pm

filter: Statementstmt 96.7% 30 / 31 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 5 totaltotal 84.4% 38 / 45 CC 2 SCAR 2.3
CC
2
Cov
94%
key_clumper_callback_begin_value
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/App/RecordStream/DomainLanguage/Library.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/Ord2Bivariate.pm »
1 package App::RecordStream::Clumper::Key::WrappedCallback;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub new
7 {
8 187 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 187 my $next = shift;
10 187 my $bucket = shift;
11 187 my $name = shift;
12 187 my $value = shift;
13  
14 187 my $this =
15 {
16 'next' => $next,
17 'bucket' => $bucket,
18 'name' => $name,
19 'value' => $value,
20 };
21 187 bless $this, $class;
22  
23 187 return $this;
24 }
25  
26 sub key_clumper_callback_begin
27 {
28 34 ▶ my $this = shift;
Subroutine key_clumper_callback_begin: called CC=1 SCAR=0.0
Pod undocumented
29  
30 34 $this->key_clumper_callback_begin_value($this->{'value'});
31 }
32  
33 sub key_clumper_callback_begin_value
34 {
35 81 ▶ my $this = shift;
Subroutine key_clumper_callback_begin_value: called CC=2 SCAR=7.1
Pod undocumented
36 81 my $value = shift;
37  
38 81 my $name = $this->{'name'};
39 81 my $bucket = $this->{'bucket'};
40 81 ▶ if(!defined($bucket))
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $bucket) 0 81 81
41 {
42 0 die "clumper_callback_begin() called in bucketless position (did you call begin() in your end()?)";
43 }
44  
45 81 return $this->{'next'}->clumper_callback_begin({%$bucket, $name => $value});
46 }
47  
48 sub key_clumper_callback_push_record
49 {
50 187 ▶ my $this = shift;
Subroutine key_clumper_callback_push_record: called CC=1 SCAR=0.0
Pod undocumented
51 187 my $cookie = shift;
52 187 my $record = shift;
53  
54 187 $this->{'next'}->clumper_callback_push_record($cookie, $record);
55 }
56  
57 sub key_clumper_callback_end
58 {
59 80 ▶ my $this = shift;
Subroutine key_clumper_callback_end: called CC=1 SCAR=0.0
Pod undocumented
60 80 my $cookie = shift;
61  
62 80 $this->{'next'}->clumper_callback_end($cookie);
63 }
64  
65 5 1;
« blib/lib/App/RecordStream/DomainLanguage/Library.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/Ord2Bivariate.pm »