1Attean::API::PushParserU(s3e)r Contributed Perl DocumentaAttitoenan::API::PushParser(3)
2
3
4

NAME

6       Attean::API::PushParser - Role for parsers that natively call a
7       callback function for each parsed item
8

VERSION

10       This document describes Attean::API::PushParser version 0.020
11

DESCRIPTION

13       The Attean::API::PushParser role defines parsers that can efficiently
14       call a callback function for each object constructed from the parsed
15       data. This role adds methods that builds on this functionality to allow
16       parsing data using 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_cb_from_io( $fh )"
25           Calls the "$parser->handler" function once for each object that
26           result from parsing the data read from the IO::Handle object $fh.
27
28       "parse_cb_from_bytes( $data )"
29           Calls the "$parser->handler" function once for each object that
30           result from parsing the data read from the UTF-8 encoded byte
31           string $data.
32

METHODS

34       This role provides default implementations of the following methods:
35
36       "parse_iter_from_io( $fh )"
37           Returns an Attean::API::Iterator that result from parsing the data
38           read from the IO::Handle object $fh.
39
40       "parse_iter_from_bytes( $data )"
41           Returns an Attean::API::Iterator that result from parsing the data
42           read from the UTF-8 encoded byte 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--2018 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.28.1                      2019-01-09        Attean::API::PushParser(3)
Impressum