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(
Subroutine BEGIN: called CC=1 SCAR=0.0
32 iterator kept_origin result_number result_original
33 2 );
34 2 ▶use DBIx::Squirrel::Stages::Flow qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
35 2 ▶use DBIx::Squirrel::Stages::Batch qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
36 2 ▶use DBIx::Squirrel::Stages::Taps qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
37 2 ▶use DBIx::Squirrel::Stages::Rows qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 2 our $VERSION = 'v4.3.1';
40  
41 2 our %EXPORT_TAGS = (
42 core => [qw(Stop is_stop gather is_stage)],
43 flow => [
44 qw(take take_first take_last take_single take_if take_while),
45 qw(drop drop_if drop_while),
46 ],
47 batch => [qw(batch collect)],
48 taps => [qw(peek count_into dump_to tee)],
49 rows => [qw(pluck as_hash)],
50 context => [qw(iterator kept_origin result_number result_original)],
51 sources => [qw(from_array from_fh from_file counter)],
52 sinks => [
53 qw(count_items keep keep_all keep_first keep_last keep_single),
54 qw(to_fh to_file),
55 ],
56 json => [qw(from_json from_jsonl to_json to_jsonl)],
57 csv => [qw(from_csv to_csv)],
58 words => [
59 qw(pipeline stage gather source generator yield),
60 qw(sink_one sink_many),
61 ],
62 );
63 2 $EXPORT_TAGS{stages} = [map { @{ $EXPORT_TAGS{$_} } } qw(flow batch taps rows)];
64  
65 # Every name once: gather is in both :core and :words.
66 2 our @EXPORT_OK = do {
67 2 my %seen;
68 102 grep { !$seen{$_}++ }
69 2 map { @{ $EXPORT_TAGS{$_} } }
70 qw(core stages context sources sinks json csv words);
71 };
72 2 $EXPORT_TAGS{all} = [@EXPORT_OK];
73  
74 2 1;
75 __END__
« blib/lib/DBIx/Squirrel/Stop.pm ↑ Summary