Revision history for Ekorn-Pipeline

Unreleased

v0.2.0 2026-11-09

    Messages say a stage can be a code reference or a pipeline.

    It ships one roadmap item, 2026-0008. Two messages change, so it's
    v0.2.0: code that matches the old wording, as a string or an
    anchored pattern, needs updating. Nothing else changes in
    behaviour. DBIx::Squirrel signed this release off before it went
    out.

    - "Expected stage #%d to be a code reference" is now "Expected
      stage #%d to be a code reference or a pipeline". (roadmap
      2026-0008)
    - "Expected stage #%s, made with gather, to return one or two code
      references" is now "Expected stage #%s, made with gather, to
      return a code reference or a pipeline, and optionally an end
      function". (roadmap 2026-0008)
    - The DIAGNOSTICS, the reference, the how-to and the README say the
      same, and no longer explain the old wording. (roadmap 2026-0008)

v0.1.3 2026-11-09

    A pipeline can be used as a stage, and the docs are plainer.

    Pipelines can be built from other pipelines without ->stages, and a
    gather block can return one. The documentation is rewritten in
    plainer English.

    It ships three roadmap items, 2026-0004, 2026-0006 and 2026-0007.
    Existing code runs as before, and every message a pipeline gives
    today reads as before. The one exception is a subclass of
    Ekorn::Pipeline used with an import list, which now croaks, as
    below. DBIx::Squirrel signed this release off before it went out.

    - Ekorn::Pipeline->new accepts a pipeline as a stage, and splices
      its stages in where it stands. They run in the new pipeline's
      run, so a take inside limits the whole run. The stages come from
      the pipeline's stages method, so a subclass can override it.
      (roadmap 2026-0004)
    - In error messages, a stage inside a pipeline used as a stage is
      named by its position in each pipeline: "Pipeline stage #2.3
      failed", or "#1.2.3" three levels down. DIAGNOSTICS shows "#%s"
      for these messages. Other stages are named as before.
      (roadmap 2026-0004)
    - is_stage, exported by Ekorn::Pipeline on request, is true for
      anything new accepts as a stage: a code reference or a pipeline.
      Use it in a function that takes its stages from the end of its
      arguments, so it accepts pipelines too. Ask for v0.1.3 on the use
      line, as v0.1.2 lets "use Ekorn::Pipeline qw(is_stage)" compile.
      (roadmap 2026-0004)
    - Ekorn::Pipeline now has an import method, from Exporter, for
      is_stage. A subclass inherits it, so "use My::Subclass qw(name)"
      croaks unless My::Subclass exports that name; before, the list
      was ignored. (roadmap 2026-0004)
    - A gather block can return a pipeline as its stage. Its stages are
      made for each run in its place, gather stages inside it afresh,
      and the block's end function, if any, is called after theirs. A
      stage inside it is named as "#2.3" in messages. The message for a
      bad gather block is unchanged. (roadmap 2026-0007)
    - The README, the POD, the reference and the how-to are rewritten
      in shorter sentences, saying the same. Two out-of-date claims in
      the README are fixed: Ekorn::Pipeline is on CPAN, and
      DBIx::Squirrel uses it. (roadmap 2026-0006)
    - The README has MetaCPAN and Kwalitee badges.

v0.1.2 2026-11-08

    The reference and the how-to on MetaCPAN, as POD manuals.

    It adds documentation only: the code is as in v0.1.1, and it ships
    no roadmap items.

    - The reference and the how-to ship as POD,
      Ekorn::Pipeline::Manual::Reference and
      Ekorn::Pipeline::Manual::HowTo, made from their Markdown, so
      MetaCPAN and perldoc have them with the modules.

v0.1.1 2026-11-08

    The pipeline from DBIx-Squirrel v2.0.2, on its own, so that any
    function can take stages from its caller.

    It ships three roadmap items, settled after v0.1.0's trial: a
    pipeline's stages can be spliced into another, with the stages
    method (2026-0001); an iterator ends once a stage dies (2026-0002);
    and a pipeline's count in scalar context is promised (2026-0003).

    - Requires Perl 5.36 or later.
    - Ekorn::Pipeline runs values through a list of stages, each a code
      reference given one value, in $_ and as its argument, and
      returning nothing (a filter), one value (a map) or several (a
      flatMap). A pipeline is called with values, or pulls them from a
      source with an iterator, calling it only as results are wanted.
    - Once a stage dies, an iterator has ended, as a pushed run has:
      every call after returns an empty list, and neither the source
      nor any end function is called again. In v0.1.0's trial it
      carried on, without the value that died. (roadmap 2026-0002)
    - Called in scalar context, a pipeline returns how many results
      came out, as an array would; the POD now promises it.
      (roadmap 2026-0003)
    - A pipeline's stages method returns its stages, so they can be
      spliced into another pipeline, or given to any function that
      takes stages, running as if listed there. (roadmap 2026-0001)
    - SECURITY.md says how to report a vulnerability, privately, and
      CONTRIBUTING.md how to report a bug or ask for a feature; the
      distribution takes issues, not pull requests.
    - Ekorn::Pipeline::Stop ends a pipeline early, passing on any
      values it carries, after which the source isn't called again. A
      stop not made by throw, and so not an array, carries nothing.
    - Ekorn::Pipeline::Gather makes a stage afresh for each run, with
      an optional end function, called once the values run out.
    - Ekorn::Pipeline::Pipes gives a class pipe and tap methods, which
      run the object through stages.
    - Canned stages: take, drop, take_while and drop_while in
      Ekorn::Pipeline::Stages::Flow; batch and collect in
      Ekorn::Pipeline::Stages::Batch; peek, count_into and dump_to in
      Ekorn::Pipeline::Stages::Taps.
    - A stage that dies is named by its place, at the caller's line, and
      so are mistakes in making a pipeline or a canned stage.
    - Modules of stages can live under any namespace: general stages
      under Ekorn::Pipeline::Stages, and those for one kind of value or
      source with the module that knows about it, built from Gather,
      Stop and croakf, which reports at the caller's line.
    - Versions: a v0.1.x only fixes or adds. A change to how stages
      behave, or a public name dropped or renamed, waits for v0.2.0.
    - A how-to, docs/HOWTO.md, with recipes for callers, function
      authors and stage authors, and a reference, docs/REFERENCE.md,
      describing every module and how a pipeline behaves, with notes
      for stage authors. Both are on GitHub, linked from the README.
