Pipeline/Element.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Pipeline/Gather.pm ↑ Summary Pipeline/Errors.pm »
1 27 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Ekorn::Pipeline::Element;
4  
5 27 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # Called as a code reference, an element calls the closure it holds,
8 # which never refers to the element itself, so the element is freed as
9 # soon as nothing else holds it.
10 27 ▶use overload '&{}' => sub ($self, @) { $self->{call} }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
11  
12 # Call the element, as calling it as a code reference does.
13 1 ▶sub call ($self, @arguments) {
Subroutine call: called CC=1 SCAR=0.0
Pod documented
14 1 return $self->{call}->(@arguments);
15 }
16  
17  
18 27 1;
19  
20 __END__
« Pipeline/Gather.pm ↑ Summary Pipeline/Errors.pm »