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

Data::TableReader::Decoder - Base class for table decoders

Attributes

filename
       Set by TableReader.  Useful for logging.

   file_handle
       Set by TableReader.  This is what the iterator should parse.

Author

       Michael Conrad <mike@nrdvana.net>

Description

       This is an abstract base class describing the API for decoders.

       A decoder's job is to iterate table rows of a file containing tabular data.  If a file provides multiple
       tables of data (such as worksheets, or <TABLE> tags) then the decode should also support the
       "next_dataset" method.

Methods

iterator
       This must be implemented by the subclass, to return an instance of Data::TableReader::Iterator.  The
       iterator should return an arrayref each time it is called, and accept one optional argument of a "slice"
       needed from the record.  All decoder iterators return arrayrefs, so the slice should be an arrayref of
       column indicies equivalent to the perl syntax

         @row[@$slice]

Name

       Data::TableReader::Decoder - Base class for table decoders

Version

       version 0.021

See Also