1Attean::API::AtOnceParsUesre(r3)Contributed Perl DocumenAttatteiaonn::API::AtOnceParser(3)
2
3
4
6 Attean::API::AtOnceParser - Role for parsers that natively parse all
7 input before returning any data
8
10 This document describes Attean::API::AtOnceParser version 0.033
11
13 The Attean::API::AtOnceParser role defines parsers that must parse all
14 input data before any objects are constructed and returned or passed to
15 callback functions. This role adds methods that builds on this
16 functionality to allow parsing data using different approaches.
17
19 This role consumes the Attean::API::Parser role.
20
22 Classes consuming this role must provide the following methods:
23
24 parse_list_from_io( $fh )
25 Returns a list of all objects that result from parsing the data
26 read from the IO::Handle object $fh.
27
28 parse_list_from_bytes( $data )
29 Returns a list of all objects that result from parsing the data
30 read from the UTF-8 encoded byte string $data.
31
33 This role provides default implementations of the following methods:
34
35 parse_iter_from_io( $fh )
36 Returns an Attean::API::Iterator that result from parsing the data
37 read from the IO::Handle object $fh.
38
39 parse_iter_from_bytes( $data )
40 Returns an Attean::API::Iterator that result from parsing the data
41 read from the UTF-8 encoded byte string $data.
42
43 parse_cb_from_io( $fh )
44 Calls the "$parser->handler" function once for each object that
45 result from parsing the data read from the IO::Handle object $fh.
46
47 parse_cb_from_bytes( $data )
48 Calls the "$parser->handler" function once for each object that
49 result from parsing the data read from the UTF-8 encoded byte
50 string $data.
51
53 Please report any bugs or feature requests to through the GitHub web
54 interface at <https://github.com/kasei/attean/issues>.
55
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 2023-01-19 Attean::API::AtOnceParser(3)