DOKK / manpages / debian 12 / libstatistics-r-io-perl / Statistics::R::IO::ParserState.3pm.en
Statistics::R::IO::ParserState(3pm) User Contributed Perl Documentation Statistics::R::IO::ParserState(3pm)

Statistics::R::IO::ParserState - Current state of the IO parser

version 1.0002

    use Statistics::R::IO::ParserState;
    
    my $state = Statistics::R::IO::ParserState->new(
        data => 'file.rds'
    );
    say $state->at
    say $state->next->at;

You shouldn't create instances of this class, it exists mainly to handle deserialization of R data files by the "IO" classes.

ACCESSORS

An array reference to the data being parsed. The constructs accepts a scalar, which will be split into individual characters.
Position of the next data element to be processed.
Returns the element (byte) at the current "position".
Returns true if the cursor ("position") is at the end of the "data".
An array reference in which unserialized data that should be exists as singletons can be "stashed" by the parser for later reference.
Return the singleton data object with the given $id.

MUTATORS

"ParserState" is intended to be immutable, so the "mutator" methods actually return a new instance with appropriately modified values of the attributes.

Returns a new ParserState instance with "position" advanced by one.
Returns a new ParserState instance with $singleton argument appended to the instance's "singletons".

Instances of this class are intended to be immutable. Please do not try to change their value or attributes.

There are no known bugs in this module. Please see Statistics::R::IO for bug reporting.

See Statistics::R::IO for support and contact information.

Davor Cubranic <cubranic@stat.ubc.ca>

This software is Copyright (c) 2017 by University of British Columbia.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007
2022-02-10 perl v5.34.0