1Pipeline::Dispatch(3) User Contributed Perl DocumentationPipeline::Dispatch(3)
2
3
4

NAME

6       Pipeline::Dispatch - dispatcher for pipeline segments
7

SYNOPSIS

9         use Pipeline::Dispatch;
10         my $dispatcher = Pipeline::Dispatch->new();
11         $dispatcher->segments();
12         $dispatcher->add( Pipeline::Segment->new() );
13         $dispatcher->delete( 0 );
14         $dispatcher->segment_available && $dispatcher->next()
15         my $method = $dispatcher->dispatch_method();
16

DESCRIPTION

18       "Pipeline::Dispatch" simply accepts pipeline segments and does very
19       little with them.  It can dispatch segments in order, one by one.  It
20       is also capable of altering the way in which it dispatches to each
21       segment, both on a pipeline basis, and on a segment-by-segment basis.
22

CONSTRUCTOR

24       new()
25           The new() constructor simply returns a new dispatcher object.
26

METHODS

28       segments( [ARRAYREF] )
29           The segments() method returns the dispatchers list of remaining
30           segments as an array reference.  Optionally the ARRAYREF argument
31           can be given to the segments() method, which will set the list.
32
33       add( LIST )
34           The add() method adds one or more segments to the dispatchers
35           segment list.
36
37       delete( INTEGER )
38           The delete() method removes the segment at index INTEGER from the
39           list of segments.
40
41       segment_available()
42           The segment_available() method returns true or false, depending on
43           whether or not there is a segment available to dispatch to.
44
45       next( [ Pipeline ] )
46           The next() method dispatches the next segment in the segment list.
47           It optionally takes a Pipeline object that is handed down to the
48           segment.
49
50       dispatch_method( [STRING] )
51           The dispatch_method() method gets and sets the method name to call
52           globally on each segment for dispatch.  Individual segments can
53           override this if they set dispatch_method themselves.
54
55       dispatched_segments( [ARRAYREF] )
56           The dispatched_segments() method gets and sets the list of segments
57           that have already been dispatched.  Used by the reset() method, and
58           probably should not be called by the user..
59
60       reset()
61           <reset()> puts the dispatcher back into an undispatched state - all
62           the segments are available for dispatch again.
63

SEE ALSO

65       Pipeline::Segment Pipeline
66

AUTHOR

68       James A. Duncan <jduncan@fotango.com>
69
71       Copyright 2003 Fotango Ltd. All Rights Reserved.
72
73       This software is released under the same terms as Perl itself.
74
75       http://opensource.fotango.com
76
77
78
79perl v5.36.0                      2023-01-20             Pipeline::Dispatch(3)
Impressum