1TAP::Parser::Iterator(3U)ser Contributed Perl DocumentatiToAnP::Parser::Iterator(3)
2
3
4

NAME

6       TAP::Parser::Iterator - Base class for TAP source iterators
7

VERSION

9       Version 3.28
10

SYNOPSIS

12         # to subclass:
13         use vars qw(@ISA);
14         use TAP::Parser::Iterator ();
15         @ISA = qw(TAP::Parser::Iterator);
16         sub _initialize {
17           # see TAP::Object...
18         }
19
20         sub next_raw { ... }
21         sub wait     { ... }
22         sub exit     { ... }
23

DESCRIPTION

25       This is a simple iterator base class that defines TAP::Parser's
26       iterator API.  Iterators are typically created from
27       TAP::Parser::SourceHandlers.
28

METHODS

30   Class Methods
31       "new"
32
33       Create an iterator.  Provided by TAP::Object.
34
35   Instance Methods
36       "next"
37
38        while ( my $item = $iter->next ) { ... }
39
40       Iterate through it, of course.
41
42       "next_raw"
43
44       Note: this method is abstract and should be overridden.
45
46        while ( my $item = $iter->next_raw ) { ... }
47
48       Iterate raw input without applying any fixes for quirky input syntax.
49
50       "handle_unicode"
51
52       If necessary switch the input stream to handle unicode. This only has
53       any effect for I/O handle based streams.
54
55       The default implementation does nothing.
56
57       "get_select_handles"
58
59       Return a list of filehandles that may be used upstream in a select()
60       call to signal that this Iterator is ready. Iterators that are not
61       handle-based should return an empty list.
62
63       The default implementation does nothing.
64
65       "wait"
66
67       Note: this method is abstract and should be overridden.
68
69        my $wait_status = $iter->wait;
70
71       Return the "wait" status for this iterator.
72
73       "exit"
74
75       Note: this method is abstract and should be overridden.
76
77        my $wait_status = $iter->exit;
78
79       Return the "exit" status for this iterator.
80

SUBCLASSING

82       Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
83
84       You must override the abstract methods as noted above.
85
86   Example
87       TAP::Parser::Iterator::Array is probably the easiest example to follow.
88       There's not much point repeating it here.
89

SEE ALSO

91       TAP::Object, TAP::Parser, TAP::Parser::Iterator::Array,
92       TAP::Parser::Iterator::Stream, TAP::Parser::Iterator::Process,
93
94
95
96perl v5.16.3                      2013-05-02          TAP::Parser::Iterator(3)
Impressum