| 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
| |||||||||||
| 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__ | ||||||||||