Pipeline::Dispatch(3)

πŸ“¦
version 3.12 Β· 2 versions
, in fedora 43

πŸ’… Pipeline::Dispatch β€” bestie edition

ok so you're reading Pipeline::Dispatch(3) from the User Contributed Perl Documentation section and honestly? it's a lil cutie. it's a dispatcher for pipeline segments. that's the whole vibe. let's go πŸ¦‹


✨ NAME ✨

Pipeline::Dispatch β€” dispatcher for pipeline segments. she dispatches. that's her job. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

use Pipeline::Dispatch;
my $dispatcher = Pipeline::Dispatch->new();
$dispatcher->segments();
$dispatcher->add( Pipeline::Segment->new() );
$dispatcher->delete( 0 );
$dispatcher->segment_available && $dispatcher->next()
my $method = $dispatcher->dispatch_method();

🌸 DESCRIPTION 🌸

so here's the tea: Pipeline::Dispatch literally just accepts pipeline segments and does very little with them. that's not a bug bestie that's the design. she's low-maintenance. she's chill. ✨

what she can do:

  • dispatch segments in order, one by one πŸ‘‘
  • alter the way she dispatches to each segment β€” both on a pipeline basis and on a segment-by-segment basis

so like, flexible queen energy. she adapts. periodt.


πŸ’… CONSTRUCTOR πŸ’…

new()

the new() constructor simply returns a new dispatcher object. that's it. that's the whole thing. no drama, no side quests, just a fresh lil dispatcher 🫢


🧚 METHODS 🧚

segments( [ARRAYREF] )

returns the dispatcher's list of remaining segments as an array reference. and if you're feeling generous, you can hand her an ARRAYREF argument and she'll set the list for you. get and set, iconic behavior πŸ’–

add( LIST )

adds one or more segments to the dispatcher's segment list. plural. multiple. she's got room for all of them 🌈

delete( INTEGER )

removes the segment at index INTEGER from the list of segments. bye bestie πŸ‘‹ (that's the segment's bye, not yours)

segment_available()

returns true or false, depending on whether or not there is a segment available to dispatch to. it's giving vibe check on the queue πŸ¦‹

next( [ Pipeline ] )

dispatches the next segment in the segment list. optionally takes a Pipeline object that gets handed down to the segment. like passing a lil note in class, but make it architecture πŸ’Œ

dispatch_method( [STRING] )

gets and sets the method name to call globally on each segment for dispatch. so like, the universal instruction, the group chat announcement πŸ“£

and here's the twist: individual segments can override this if they set dispatch_method themselves. main character segments get to make their own choices, we respect that πŸ‘‘

dispatched_segments( [ARRAYREF] )

gets and sets the list of segments that have already been dispatched. used by the reset() method...

πŸ™ˆ and probably should not be called by the user. like it's not forbidden, it's just... not for you bestie. hands off the internals. iykyk.

reset()

<reset()> puts the dispatcher back into an undispatched state β€” all the segments are available for dispatch again. it's a glow-up. it's a do-over. it's a factory reset for your pipeline βœ¨πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Pipeline::Segment Pipeline

(the whole friend group, go say hi)


πŸ‘‘ AUTHOR πŸ‘‘

James A. Duncan <jduncan@fotango.com>


Copyright 2003 Fotango Ltd. All Rights Reserved.

This software is released under the same terms as Perl itself.

http://opensource.fotango.com


and that's the whole page bestie πŸŽ€ this was Pipeline::Dispatch(3) from perl v5.42.0, dated 2025-07-25, living in the User Contributed Perl Documentation. go dispatch something iconic πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from