Pipeline::Segment(3)
π Pipeline::Segment π
okay so this is Pipeline::Segment(3), from the User Contributed Perl Documentation section of your man pages, and bestie it is so foundational. let's get into it π¦
β¨ NAME β¨
Pipeline::Segment β the basic class for a segment, fr fr π
πΈ SYNOPSIS πΈ
use Pipeline::Segment;
my $ps = Pipeline::Segment->new();
$ps->dispatch();
like. that's it. that's the whole vibe check. β¨
π DESCRIPTION π
so Pipeline::Segment is literally designed as a part of the Pipeline system β it's one lil piece of the whole machine, no cap. and the main character energy here is that the Pipeline::Segment class is designed to be subclassed as a part of the Pipeline system. you're not really meant to just... use it raw like that. you're meant to build on top of it. periodt. π
the primary method that needs to be overloaded is the dispatch method β that's the one the Pipeline class uses to enter each individual segment that it contains. so like, the pipeline is walking down the row of segments and going "hey, you, do your thing" and dispatch is the thing. that's the whole door. πͺβ¨
π§ METHODS π§
the Pipeline::Segment class inherits from Pipeline::Base, which means it also has any additional methods that its superclass may have. so if you're looking for a method and it's not here... check the parent. iykyk. π
init()β this one gets called at construction time, like right when the object is being born π£. any arguments you pass to thenewmethod get passed straight to it.dispatch()β this is the one. it causes the segment to perform its action. this is the method you're supposed to overload in your subclass. no pressure bestie, only all of it πdispatch_method()β this one gets and sets the method that gets called on dispatch. and by default, that's thedispatch()method. so yeah, it's the method that picks the method. method-ception. πcleanup_dispatch()β okay so this one does post-processing on the segment to make sure no nasty circular references are lying around π (those little gremlins will absolutely wreck your memory if you let them). it also disconnects various objects that are only useful during a dispatch. so basically: the after-party cleanup crew. π§Ήβ¨store()β gets the current store. that's it, that's the whole thing. ποΈparent()β returns the pipeline that the segment is currently operating from. and heads up: it gets set at dispatch time by the calling pipeline, so it's not just sitting there from the jump β the pipeline comes along and assigns it. π«Ά
π₯ SEE ALSO π₯
PipelinePipeline::Segment::Async
π AUTHOR π
James A. Duncan <jduncan@fotango.com> β absolute legend, we stan π«‘π
π COPYRIGHT π
Copyright 2003 Fotango Ltd. All Rights Reserved.
This software is released under the same terms as Perl itself.
lowkey important reminder bestie: this is documentation forPipeline::Segment(3)and it's part of the User Contributed Perl Documentation collection, so if you're out here writing your own subclass, please actually read thePipeline::Basedocs too. the inherited methods are real and they matter. ππ
and that's the page, babe! πΈ this was perl v5.42.0, dated 2025-07-25, and it's Pipeline::Segment(3) all day every day. go forth and subclass responsibly π¦ππ
π¦ where this page comes from
- fedora 43: perl-Pipeline 3.12-51.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms