1POE::Filter::Stackable(U3s)er Contributed Perl DocumentatPiOoEn::Filter::Stackable(3)
2
3
4

NAME

6       POE::Filter::Stackable - POE Multiple Filter Abstraction
7

SYNOPSIS

9         $filter = new POE::Filter::Stackable(Filters => [ $filter1, $filter2 ]);
10         $filter = new POE::Filter::Stackable;
11         $filter->push($filter1, $filter2);
12         $filter2 = $filter->pop;
13         $filter1 = $filter->shift;
14         $filter->unshift($filter1, $filter2);
15         $arrayref_for_driver = $filter->put($arrayref_of_data);
16         $arrayref_for_driver = $filter->put($single_data_element);
17         $arrayref_of_data = $filter->get($arrayref_of_raw_data);
18         $arrayref_of_leftovers = $filter->get_pending;
19         @filter_type_names = $filter->filter_types;
20         @filter_objects = $filter->filters;
21

DESCRIPTION

23       The Stackable filter allows the use of multiple filters within a single
24       wheel.  Internally, filters are stored in an array, with array index 0
25       being "near" to the wheel's handle and therefore being the first filter
26       passed through using "get" and the last filter passed through in "put".
27       All POE::Filter public methods are implemented as though data were
28       being passed through a single filter; other program components do not
29       need to know there are multiple filters.
30

PUBLIC FILTER METHODS

32       new The new() method creates the Stackable filter.  It accepts an
33           optional parameter "Filters" that specifies an arrayref of initial
34           filters.  If no filters are given, Stackable will pass data through
35           unchanged; this is true if there are no filters present at any
36           time.
37
38       pop =item shift =item push =item unshift
39           POE::Filter::Stackable::pop() POE::Filter::Stackable::shift()
40           POE::Filter::Stackable::push($filter1, $filter2, ...)  POE::Fil‐
41           ter::Stackable::unshift($filter1, $filter2...)
42
43           These methods all function identically to the perl builtin func‐
44           tions of the same name.  push() and unshift() will return the new
45           number of filters inside the Stackable filter.
46
47       filter_types
48           The filter_types() method returns a list of types for the filters
49           inside the Stackable filter, in order from near to far; for exam‐
50           ple, qw(Block HTTPD).
51
52       filters
53           The filters() method returns a list of the objects inside the
54           Stackable filter, in order from near to far.
55
56       *   See POE::Filter.
57

SEE ALSO

59       POE::Filter; POE::Filter::HTTPD; POE::Filter::Reference; POE::Fil‐
60       ter::Line; POE::Filter::Block; POE::Filter::Stream
61

BUGS

63       Undoubtedly.  None currently known.
64

AUTHORS & COPYRIGHTS

66       The Stackable filter was contributed by Dieter Pearcey.  Rocco Caputo
67       is sure to have had his hands in it.
68
69       Please see the POE manpage for more information about authors and con‐
70       tributors.
71
72
73
74perl v5.8.8                       2006-09-01         POE::Filter::Stackable(3)
Impressum