Pipeline/Element.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Pipeline/Context.pm ↑ Summary Pipeline/Errors.pm »
1 32 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Ekorn::Pipeline::Element;
4  
5 32 ▶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 32 ▶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 32 our $VERSION = 'v0.4.0';
13  
14 # Call the element, as calling it as a code reference does.
15 1 ▶sub call ($self, @arguments) {
Subroutine call: called CC=1 SCAR=0.0
Pod documented
16 1 return $self->{call}->(@arguments);
17 }
18  
19  
20 32 1;
21  
22 __END__
« Pipeline/Context.pm ↑ Summary Pipeline/Errors.pm »