Pipeline/Pipes.pm

filter: Statementstmt 100% 12 / 12 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 100% 20 / 20 CC 2 SCAR 3.4
CC
2
Cov
100%
pipe
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Pipeline/Sinks.pm ↑ Summary Pipeline/Sink.pm »
1 3 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Ekorn::Pipeline::Pipes;
4  
5 3 ▶use Ekorn::Pipeline qw();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # Run the invocant through a pipeline of stages.
8 11 ▶sub pipe ($self, @stages) { ## no critic (Subroutines::ProhibitBuiltinHomonyms)
Subroutine pipe: called CC=2 SCAR=6.9
Pod documented
9 11 my $pipeline = Ekorn::Pipeline->new(@stages);
10 10 my @results = $pipeline->($self);
11 9 ▶ return wantarray ? @results : $results[0];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 5 4 9
12 }
13  
14 # Run the invocant through a pipeline of stages for their side effects, and
15 # return the invocant.
16 10 ▶sub tap ($self, @stages) {
Subroutine tap: called CC=1 SCAR=0.0
Pod documented
17 10 my $pipeline = Ekorn::Pipeline->new(@stages);
18 9 $pipeline->($self);
19 8 return $self;
20 }
21  
22 3 1;
23 __END__
« Pipeline/Sinks.pm ↑ Summary Pipeline/Sink.pm »