Changes for version v0.3.11 - 2026-11-24

  • Ekorn::Pipeline::Context tells a stage which result it's making, and from what: each run counts its results, and keeps the value each is made from, so a stage can number what it gives, or reach the value as it came in, whatever stages changed it since. DBIx::Squirrel's functions of the same names can be built on it, and drop the stage it adds to count, which costs it 200 to 260 ns a row.
  • It ships roadmap 2026-0046. It only adds, but every run now counts, whether its stages ask or not.
  • Ekorn::Pipeline::Context: result_number, the run's results so far, plus one, a result being a value that leaves the last stage or reaches a sink; and result_original, the value the run's source gave, or that was pushed, before any stage changed it, undef for a flush's values. Each run counts its own: a pipeline run inside a stage, a tee's branch and an iterator read as a source each count from 1. Both are undef outside a run, and in an end. (roadmap 2026-0046)
  • Every run counts its results, which costs a value 15 to 75 ns through one stage that does nothing, on Perl 5.36 and 5.44: 1 to 3% for an iterator's all, 3 to 12% for a pushed run, and 6 to 8% for an iterator's next. Less through stages that do work. Roadmap 2026-0046's record has the measurements, and why every run counts.
  • Ekorn::Pipeline::Tooling doesn't export them, in v0.3.x: DBIx::Squirrel::Tooling exports functions of the same names, and DBIx-Squirrel v3.5.0's tests fail if both export different subs by one name. Import them from Ekorn::Pipeline::Context.
  • The reference has a section on them, and the how-to a recipe.

Documentation

Ekorn::Pipeline user guide
Ekorn::Pipeline reference

Modules

run values through a list of stages
read and write CSV and TSV, as sources, stages or sinks
what a stage can ask about the result it's making
what Ekorn's types are made from
report Ekorn::Pipeline's errors at the caller's line
words that make Ekorn's types
one run, fed values as they arrive
a stage made afresh for each run, told when its values run out
one run, handing out its values as they're pulled
read and write JSON and JSON Lines, as sources, stages or sinks
|, |= and @{} for Ekorn's types
pipe and tap methods, running an object through stages
a sink made afresh for each run
ready-made sinks, needing only Perl
a source made afresh for each run
ready-made sources, needing only Perl
a stage, as an object
stages gathering values: batch and collect
stages taking or dropping values: take, drop, take_if, drop_if, take_while and drop_while
stages run for their side effects: peek, count_into, dump_to and tee
end a pipeline early
name pipelines as the program compiles, each with a function
Ekorn's stages, sources, sinks and words, from one module

Provides

in lib/Ekorn/Pipeline/CSV.pm
in lib/Ekorn/Pipeline/Operators.pm
in lib/Ekorn/Pipeline/Operators.pm
in lib/Ekorn/Pipeline/Sink.pm
in lib/Ekorn/Pipeline/Sink.pm