| 1 | 2 | ▶ | use v5.36; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package Ekorn::Pipeline::Tooling; | ||
| 4 | |||
| 5 | 2 | ▶ | use Exporter qw(import); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | # What each module exports, by default or on request, imported here, so | ||
| 8 | # Exporter can export it again. t/23-tooling.t checks that each tag below | ||
| 9 | # holds every name its module exports. | ||
| 10 | 2 | ▶ | use Ekorn::Pipeline::Stop qw(Stop); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 2 | ▶ | use Ekorn::Pipeline::Gather qw(gather); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 2 | ▶ | use Ekorn::Pipeline::Stages::Flow qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 2 | ▶ | use Ekorn::Pipeline::Stages::Batch qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 2 | ▶ | use Ekorn::Pipeline::Stages::Taps qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 2 | ▶ | use Ekorn::Pipeline::Sources qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 2 | ▶ | use Ekorn::Pipeline::Sinks qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 2 | ▶ | use Ekorn::Pipeline::Factories qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 2 | ▶ | use Ekorn::Pipeline::JSON qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 2 | our %EXPORT_TAGS = ( | |
| 21 | core => [qw(Stop gather)], | ||
| 22 | flow => [ | ||
| 23 | qw(take take_first take_last take_single take_if take_while), | ||
| 24 | qw(drop drop_if drop_while), | ||
| 25 | ], | ||
| 26 | batch => [qw(batch collect)], | ||
| 27 | taps => [qw(peek count_into dump_to tee)], | ||
| 28 | sources => [qw(from_array from_fh from_file counter)], | ||
| 29 | sinks => [ | ||
| 30 | qw(count_items keep keep_all keep_first keep_last keep_single), | ||
| 31 | qw(to_fh to_file), | ||
| 32 | ], | ||
| 33 | json => [qw(from_json from_jsonl to_json to_jsonl)], | ||
| 34 | words => [ | ||
| 35 | qw(pipeline stage gather source generator yield), | ||
| 36 | qw(sink_one sink_many), | ||
| 37 | ], | ||
| 38 | ); | ||
| 39 | 2 | $EXPORT_TAGS{stages} = [map { @{ $EXPORT_TAGS{$_} } } qw(flow batch taps)]; | |
| 40 | |||
| 41 | # Every name once: gather is in both :core and :words. | ||
| 42 | 2 | our @EXPORT_OK = do { | |
| 43 | 2 | my %seen; | |
| 44 | 82 | grep { !$seen{$_}++ } | |
| 45 | 2 | map { @{ $EXPORT_TAGS{$_} } } qw(core stages sources sinks json words); | |
| 46 | }; | ||
| 47 | 2 | $EXPORT_TAGS{all} = [@EXPORT_OK]; | |
| 48 | |||
| 49 | 2 | 1; | |
| 50 | |||
| 51 | __END__ | ||