logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Attean::API::AtOnceParser - Role for parsers that natively parse all input before returning any data

Author

       Gregory Todd Williams  "<gwilliams@cpan.org>"

Bugs

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

Description

       The Attean::API::AtOnceParser role defines parsers that must parse all input data before any objects are
       constructed and returned or passed to callback functions. This role adds methods that builds on this
       functionality to allow parsing data using different approaches.

Methods

       This role provides default implementations of the following methods:

       parse_iter_from_io( $fh )
           Returns an Attean::API::Iterator that result from parsing the data read from  the  IO::Handle  object
           $fh.

       parse_iter_from_bytes( $data )
           Returns  an  Attean::API::Iterator that result 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 result 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 result from parsing the data read
           from the UTF-8 encoded byte string $data.

Name

       Attean::API::AtOnceParser - Role for parsers that natively parse all input before returning any data

Required Methods

       Classes consuming this role must provide the following methods:

       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.

Roles

       This role consumes the Attean::API::Parser role.

See Also

Version

       This document describes Attean::API::AtOnceParser version 0.035

See Also