blib/lib/DBIx/Squirrel/Tooling.pm

filter: Statementstmt 100% 50 / 50 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 13 / 13 Podpod n/a totaltotal 100% 63 / 63 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DBIx/Squirrel/Stop.pm ↑ Summary
1 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package DBIx::Squirrel::Tooling;
4  
5 1 ▶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: from DBIx::Squirrel's own module where
9 # it has one, and from Ekorn::Pipeline's only where it has none, so a
10 # name both export is DBIx::Squirrel's (roadmap 2026-0025, D6). Each is
11 # imported once, by name: gather is Factories' word too, and comes from
12 # DBIx::Squirrel::Gather. t/28-tooling.t checks that each tag below
13 # holds every name its module exports, and that each name both packages
14 # export is one sub.
15 1 ▶use Ekorn::Pipeline::Sources qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Ekorn::Pipeline::Sinks qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use Ekorn::Pipeline::JSON qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use Ekorn::Pipeline::Factories qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
19 pipeline stage source generator yield
20 1 sink_one sink_many);
21  
22 1 ▶use DBIx::Squirrel::Stop qw(Stop);
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 ▶use DBIx::Squirrel::Gather qw(gather);
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use DBIx::Squirrel::Context qw(iterator result_number result_original);
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶use DBIx::Squirrel::Stages::Flow qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use DBIx::Squirrel::Stages::Batch qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use DBIx::Squirrel::Stages::Taps qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶use DBIx::Squirrel::Stages::Rows qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 1 our %EXPORT_TAGS = (
31 core => [qw(Stop gather)],
32 flow => [
33 qw(take take_first take_last take_single take_if take_while),
34 qw(drop drop_if drop_while),
35 ],
36 batch => [qw(batch collect)],
37 taps => [qw(peek count_into dump_to tee)],
38 rows => [qw(pluck as_hash)],
39 context => [qw(iterator result_number result_original)],
40 sources => [qw(from_array from_fh from_file counter)],
41 sinks => [
42 qw(count_items keep keep_all keep_first keep_last keep_single),
43 qw(to_fh to_file),
44 ],
45 json => [qw(from_json from_jsonl to_json to_jsonl)],
46 words => [
47 qw(pipeline stage gather source generator yield),
48 qw(sink_one sink_many),
49 ],
50 );
51 1 $EXPORT_TAGS{stages} = [map { @{ $EXPORT_TAGS{$_} } } qw(flow batch taps rows)];
52  
53 # Every name once: gather is in both :core and :words.
54 1 our @EXPORT_OK = do {
55 1 my %seen;
56 46 grep { !$seen{$_}++ }
57 1 map { @{ $EXPORT_TAGS{$_} } }
58 qw(core stages context sources sinks json words);
59 };
60 1 $EXPORT_TAGS{all} = [@EXPORT_OK];
61  
62 1 1;
63  
64 __END__
« blib/lib/DBIx/Squirrel/Stop.pm ↑ Summary