-
-
27 Jun 2019 19:43:31 UTC
- Distribution: Data-TableReader
- Module version: 0.011
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (716 / 8 / 0)
- Kwalitee
Bus factor: 2- 69.47% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (45.88KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Data::TableReader::Decoder - Base class for table decoders
VERSION
version 0.011
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.
ATTRIBUTES
filename
Set by TableReader. Useful for logging.
file_handle
Set by TableReader. This is what the iterator should parse.
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]
AUTHOR
Michael Conrad <mike@nrdvana.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2019 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Data::TableReader, copy and paste the appropriate command in to your terminal.
cpanm Data::TableReader
perl -MCPAN -e shell install Data::TableReader
For more information on module installation, please visit the detailed CPAN module installation guide.