1Attean::API::Parser(3)User Contributed Perl DocumentationAttean::API::Parser(3)
2
3
4

NAME

6       Attean::API::Parser - Parser role
7

VERSION

9       This document describes Attean::API::Parser version 0.033
10

DESCRIPTION

12       The Attean::API::Parser role defines a common API for all parsers of
13       typed objects from data (either a byte string or a filehandle).
14

ATTRIBUTES

16       The following attributes exist:
17
18       "handler"
19           A code reference that will be called during callback-variant
20           parsing  methods.  This attribute has a default (no-op function),
21           so specifying it is not necessary if using iterator- or list-
22           variant parsing methods.
23

REQUIRED METHODS

25       The following methods are required by the Attean::API::Parser role:
26
27       "canonical_media_type"
28           Returns the canonical media type string for the format of this
29           parser.
30
31       "media_types"
32           Returns an ARRAY reference of media type strings that are
33           acceptable as input to this parser.
34
35       "handled_type"
36           Returns a Type::Tiny object representing the type of items that
37           result from parsing.
38
39       "file_extensions"
40           Returns an ARRAY reference of file extensions commonly associated
41           with the media types supported by the parser (and returned by
42           "media_types").  File extensions should NOT include a leading dot.
43
44       "new_iri( value => $value )"
45           Constructs and returns a new Attean::IRI object, respecting the
46           parser's "lazy_iris" attribute.
47

BUGS

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

SEE ALSO

AUTHOR

54       Gregory Todd Williams  "<gwilliams@cpan.org>"
55
57       Copyright (c) 2014--2022 Gregory Todd Williams.  This program is free
58       software; you can redistribute it and/or modify it under the same terms
59       as Perl itself.
60
61
62
63perl v5.38.0                      2023-07-20            Attean::API::Parser(3)
Impressum