NAME
Ekorn::Pipeline::Tooling - Ekorn's stages, sources, sinks and words, from one module
SYNOPSIS
use Ekorn::Pipeline;
use Ekorn::Pipeline::Tooling qw(:all);
my $first = Ekorn::Pipeline->new(
take_if { m( \A ERROR )x },
keep_first,
)->iterator(from_file('app.log'))->();
use Ekorn::Pipeline::Tooling qw(:stages :sinks); # or only some
use Ekorn::Pipeline::Tooling qw(take keep_all); # or by name
DESCRIPTION
What a caller uses to do work with Ekorn::Pipeline is made in several modules: stages in Ekorn::Pipeline::Stages::Flow, Batch and Taps, sources in Ekorn::Pipeline::Sources, sinks in Ekorn::Pipeline::Sinks, JSON's sources, sinks and stages in Ekorn::Pipeline::JSON, the words in Ekorn::Pipeline::Factories, and Stop and gather in modules of their own. This module exports all of them, by the tags below, so there's one module to import from, and nothing to remember about which module makes which.
Each name is the very sub its own module exports, prototype and all, so take_if { ... } and stage { ... } parse as they do imported from there. Importing a name from both does no harm.
Nothing is exported by default: ask for tags, or names, or both. An unknown tag or name is reported by Exporter, as it is for any module.
It leaves out what's for extending the package rather than using it, such as is_stage and is_sink, from Ekorn::Pipeline, and croakf, from Ekorn::Pipeline::Errors: import those from their own modules. And it doesn't put the operators in force: Ekorn::Pipeline::Operators is a pragma, which puts | in force only in the scope that uses it, by name.
TAGS
:core-
Stop, from Ekorn::Pipeline::Stop, andgather, from Ekorn::Pipeline::Gather. :flow-
Everything Ekorn::Pipeline::Stages::Flow exports:
take,take_first,take_last,take_single,take_if,take_while,drop,drop_ifanddrop_while. :batch-
Everything Ekorn::Pipeline::Stages::Batch exports:
batchandcollect. :taps-
Everything Ekorn::Pipeline::Stages::Taps exports:
peek,count_intoanddump_to. :stages-
:flow,:batchand:taps. :sources-
Everything Ekorn::Pipeline::Sources exports:
from_array,from_fh,from_fileandcounter. :sinks-
Everything Ekorn::Pipeline::Sinks exports:
count_items,keep,keep_all,keep_first,keep_last,keep_single,to_fhandto_file. :json-
Everything Ekorn::Pipeline::JSON exports:
from_json,from_jsonl,to_jsonandto_jsonl. JSON exports afrom_jsonand ato_jsonof its own, by default, so a module using both imports:allfrom only one of them. :words-
Everything Ekorn::Pipeline::Factories exports:
pipeline,stage,gather,source,generatorandyield,sink_oneandsink_many. :all-
All of the above.
A tag holds every name its module exports, by default or on request. What a tag holds is part of the interface: a name may be added to one in a release that only adds, but is dropped or renamed only in one that moves the middle number of the version.
SEE ALSO
Ekorn::Pipeline, Ekorn::Pipeline::Operators, Ekorn::Pipeline::Manual::Reference
AUTHOR
Iain Campbell <cpanic@cpan.org>
LICENSE
Copyright (c) 2024-2026 by Iain Campbell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.