Statis...rState(3pm)

✨ Statistics::R::IO::ParserState β€” the current state of the IO parser ✨

okay bestie, listen up πŸ’– this is Statistics::R::IO::ParserState, a lil Perl module from the Statistics::R::IO family, and she is version 1.0002. She's the vibe-check keeper of where the parser is at, at any given moment. Very demure, very mindful, very immutable. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

use Statistics::R::IO::ParserState;

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

🌸 DESCRIPTION 🌸

so like. you should not be out here creating instances of this class yourself, bestie, no cap πŸ™ˆ. She exists mainly to handle deserialization of R data files by the "IO" classes. She's the backstage crew, not the main character (even though she is giving main character energy, fr fr).


πŸ’… METHODS πŸ’…

πŸ’– ACCESSORS πŸ’–

  • data β€” an array reference to the data being parsed. The construct accepts a scalar, and that scalar gets split into individual characters. slay.
  • position β€” where the next data element to be processed is sitting. her little cursor home. πŸ“
  • at β€” returns the element (byte) at the current position. it's giving "what's under the cursor rn".
  • eof β€” returns true if the cursor (position) is at the end of the data. that's it, that's the whole vibe check. ✨
  • singletons β€” an array reference where unserialized data that should exist as singletons can be stashed by the parser for later reference. little storage closet for special lil guys. πŸŽ€
  • get_singleton $id β€” returns the singleton data object with the given $id. go fetch, bestie.

🧚 MUTATORS 🧚

"ParserState" is intended to be immutable, so the "mutator" methods actually return a new instance with appropriately modified values of the attributes. not me changing myself β€” I'm literally built different πŸ’€ she doesn't edit herself, she just drops a whole new version of herself. iconic.

  • next β€” returns a new ParserState instance with position advanced by one. one step forward, no cap.
  • add_singleton $singleton β€” returns a new ParserState instance with the $singleton argument appended to the instance's singletons. adding to the collection, respectfully. 🫢

😭 BUGS AND LIMITATIONS 😭

  • Instances of this class are intended to be immutable. Please do not try to change their value or attributes. like... respect her boundaries, bestie. 🚫
  • There are no known bugs in this module. Please see Statistics::R::IO for bug reporting. ngl a bug-free module is a rare and precious thing, we love to see it πŸ”₯

🌈 SUPPORT 🌈

See Statistics::R::IO for support and contact information. she's got people, iykyk. πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

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

and that's the whole page, bestie!! πŸŽ€ this one was generated with perl v5.34.0 on 2022-02-10 β€” mwah, take care, stay immutable, and don't let anyone mutate your attributes. periodt. πŸ’…βœ¨