blib/lib/DBIx/Squirrel/Tooling.pm

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