Pipeline/Pipes.pm

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