blib/lib/DBIx/Squirrel/Tooling.pm

filter: Statementstmt 100% 53 / 53 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 14 / 14 Podpod n/a totaltotal 100% 67 / 67 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::CSV qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use Ekorn::Pipeline::Factories qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
20 pipeline stage source generator yield
21 1 sink_one sink_many);
22  
23 1 ▶use DBIx::Squirrel::Stop qw(Stop);
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use DBIx::Squirrel::Gather qw(gather);
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶use DBIx::Squirrel::Context qw(iterator result_number result_original);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use DBIx::Squirrel::Stages::Flow qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use DBIx::Squirrel::Stages::Batch qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶use DBIx::Squirrel::Stages::Taps qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
29 1 ▶use DBIx::Squirrel::Stages::Rows qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 1 our %EXPORT_TAGS = (
32 core => [qw(Stop gather)],
33 flow => [
34 qw(take take_first take_last take_single take_if take_while),
35 qw(drop drop_if drop_while),
36 ],
37 batch => [qw(batch collect)],
38 taps => [qw(peek count_into dump_to tee)],
39 rows => [qw(pluck as_hash)],
40 context => [qw(iterator result_number result_original)],
41 sources => [qw(from_array from_fh from_file counter)],
42 sinks => [
43 qw(count_items keep keep_all keep_first keep_last keep_single),
44 qw(to_fh to_file),
45 ],
46 json => [qw(from_json from_jsonl to_json to_jsonl)],
47 csv => [qw(from_csv to_csv)],
48 words => [
49 qw(pipeline stage gather source generator yield),
50 qw(sink_one sink_many),
51 ],
52 );
53 1 $EXPORT_TAGS{stages} = [map { @{ $EXPORT_TAGS{$_} } } qw(flow batch taps rows)];
54  
55 # Every name once: gather is in both :core and :words.
56 1 our @EXPORT_OK = do {
57 1 my %seen;
58 48 grep { !$seen{$_}++ }
59 1 map { @{ $EXPORT_TAGS{$_} } }
60 qw(core stages context sources sinks json csv words);
61 };
62 1 $EXPORT_TAGS{all} = [@EXPORT_OK];
63  
64 1 1;
65  
66 __END__
« blib/lib/DBIx/Squirrel/Stop.pm ↑ Summary