Attean...eParser(3pm)

Attean::API::AtOnceParser is the main character of this page from the User Contributed Perl Documentation, 3pm section. Let's get into it, bestie. 🫢

πŸ’– NAME πŸ’–

Attean::API::AtOnceParser β€” a role for parsers that natively parse all input before returning any data.

🌸 VERSION 🌸

This page describes Attean::API::AtOnceParser version 0.035, no cap.

✨ DESCRIPTION ✨

The Attean::API::AtOnceParser role defines parsers that have to parse all the input data before any objects are constructed and returned, or passed to callback functions. It's giving "finish the whole snack before sharing," honestly. πŸ“

This role adds methods that build on that all-at-once functionality so you can parse data using different approaches. Obsessed with the flexibility, lowkey. ✨

πŸŽ€ ROLES πŸŽ€

This role consumes the Attean::API::Parser role. Periodt. πŸ’…

🧚 REQUIRED METHODS 🧚

Any class consuming this role must provide the following methods, fr fr:

  • parse_list_from_io( $fh ) β€” returns a list of all objects that result from parsing the data read from the IO::Handle object $fh.
  • parse_list_from_bytes( $data ) β€” returns a list of all objects that result from parsing the data read from the UTF-8 encoded byte string $data.

πŸ’… METHODS πŸ’…

This role provides default implementations of the following methods:

  • parse_iter_from_io( $fh ) β€” returns an Attean::API::Iterator that results from parsing the data read from the IO::Handle object $fh.
  • parse_iter_from_bytes( $data ) β€” returns an Attean::API::Iterator that results from parsing the data read from the UTF-8 encoded byte string $data.
  • parse_cb_from_io( $fh ) β€” calls the $parser->handler function once for each object that results from parsing the data read from the IO::Handle object $fh.
  • parse_cb_from_bytes( $data ) β€” calls the $parser->handler function once for each object that results from parsing the data read from the UTF-8 encoded byte string $data.

πŸ› BUGS πŸ›

Please report any bugs or feature requests through the GitHub web interface at <https://github.com/kasei/attean/issues>. The maintainers wanna hear it, bestie β€” don't gatekeep the bug reports. πŸ¦‹

πŸ‘€ SEE ALSO πŸ‘€

The original page has this heading but lists no entries under it. So, like, nothing extra to link here β€” but we keep the section because structure is iconic. πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams "<gwilliams@cpan.org>" β€” yes, that's the author credit, exactly as written. πŸ‘‘

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 page! footer vibes: perl v5.40.0, dated 2025-01-26, on the Attean...eParser(3pm) page. byeee πŸ’œ

πŸ“¦ where this page comes from