1Attean::API::PullParserU(s3e)r Contributed Perl DocumentaAttitoenan::API::PullParser(3)
2
3
4

NAME

6       Attean::API::PullParser - Role for parsers that natively return an
7       iterator
8

VERSION

10       This document describes Attean::API::PullParser version 0.033
11

DESCRIPTION

13       The Attean::API::PullParser role defines parsers that can efficiently
14       construct and return an iterator of the parsed data. This role adds
15       methods that builds on this functionality to allow parsing data using
16       different approaches.
17

ROLES

19       This role consumes the Attean::API::Parser role.
20

REQUIRED METHODS

22       Classes consuming this role must provide the following methods:
23
24       "parse_iter_from_io( $fh )"
25           Returns an Attean::API::Iterator that result from parsing the data
26           read from the IO::Handle object $fh.
27
28       "parse_iter_from_bytes( $data )"
29           Returns an Attean::API::Iterator that result from parsing the data
30           read from the UTF-8 encoded byte string $data.
31

METHODS

33       This role provides default implementations of the following methods:
34
35       "parse_cb_from_io( $fh )"
36           Calls the "$parser->handler" function once for each object that
37           result from parsing the data read from the IO::Handle object $fh.
38
39       "parse_cb_from_bytes( $data )"
40           Calls the "$parser->handler" function once for each object that
41           result from parsing the data read from the UTF-8 encoded byte
42           string $data.
43
44       "parse_list_from_io( $fh )"
45           Returns a list of all objects that result from parsing the data
46           read from the IO::Handle object $fh.
47
48       "parse_list_from_bytes( $data )"
49           Returns a list of all objects that result from parsing the data
50           read from the UTF-8 encoded byte string $data.
51

BUGS

53       Please report any bugs or feature requests to through the GitHub web
54       interface at <https://github.com/kasei/attean/issues>.
55

SEE ALSO

AUTHOR

58       Gregory Todd Williams  "<gwilliams@cpan.org>"
59
61       Copyright (c) 2014--2022 Gregory Todd Williams.  This program is free
62       software; you can redistribute it and/or modify it under the same terms
63       as Perl itself.
64
65
66
67perl v5.36.0                      2022-10-03        Attean::API::PullParser(3)
Impressum