Attean...:Parser(3pm)

NAME πŸ’–

Attean::API::Parser β€” Parser role πŸ’…

okay bestie, this is the Attean...:Parser(3pm) page from the User Contributed Perl Documentation ✨.

VERSION ✨

This document describes Attean::API::Parser version 0.035 πŸŽ€.

DESCRIPTION πŸ¦‹

The Attean::API::Parser role defines a common API for all parsers of typed objects from data (either a byte string or a filehandle). No cap, that’s the whole vibe: one shared interface for parsers that turn data into typed objects 🌈.

ATTRIBUTES πŸŽ€

The following attributes exist:

handler

A code reference that will be called during callback-variant parsing methods 🫢. It has a default (a no-op function), so specifying it is not necessary if you’re using iterator- or list-variant parsing methods. Lowkey convenient, fr fr πŸ’….

REQUIRED METHODS πŸ’…

The following methods are required by the Attean::API::Parser role:

canonical_media_type

Returns the canonical media type string for the format of this parser ✨.

media_types

Returns an ARRAY reference of media type strings that are acceptable as input to this parser 🌈.

handled_type

Returns a Type::Tiny object representing the type of items that result from parsing πŸ’–.

file_extensions

Returns an ARRAY reference of file extensions commonly associated with the media types supported by the parser (and returned by media_types) πŸ¦‹. Important vibe check: file extensions should NOT include a leading dot. Periodt.

new_iri( value => $value )

Constructs and returns a new Attean::IRI object, respecting the parser’s lazy_iris attribute πŸ‘‘.

new_literal

Constructs and returns a new Attean::Literal object 🌸.

Signature, exactly:

new_literal( value => $value, [ datatype => $dt, ] [ language => $lang
       ])

BUGS πŸ›

Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/attean/issues> πŸ’€. (Yes, the original says β€œto through”—we’re keeping the detail, bestie.)

SEE ALSO πŸ‘€

The original page leaves this section emptyβ€”no entries, literally crickets πŸ¦—. So there’s nothing to link here, and that’s the whole tea 🫢.

AUTHOR πŸ‘‘

Gregory Todd Williams "<gwilliams@cpan.org>" πŸ’–.

Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🫢✨


okay that’s the whole page, bestie! Signed off from Attean...:Parser(3pm) with perl v5.40.0, dated 2025-01-26 πŸ’–βœ¨

πŸ“¦ where this page comes from