1Pipeline::Dispatch(3) User Contributed Perl DocumentationPipeline::Dispatch(3)
2
3
4
6 Pipeline::Dispatch - dispatcher for pipeline segments
7
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
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
24 new()
25 The "new()" constructor simply returns a new dispatcher object.
26
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
43 on 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
47 list. It optionally takes a Pipeline object that is handed down to
48 the segment.
49
50 dispatch_method( [STRING] )
51 The "dispatch_method()" method gets and sets the method name to
52 call globally on each segment for dispatch. Individual segments
53 can override this if they set dispatch_method themselves.
54
55 dispatched_segments( [ARRAYREF] )
56 The "dispatched_segments()" method gets and sets the list of
57 segments that have already been dispatched. Used by the "reset()"
58 method, and 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
65 Pipeline::Segment Pipeline
66
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.34.0 2021-07-22 Pipeline::Dispatch(3)