FlatFile::DataStore::Toc - Perl module that implements a flatfile datastore TOC (table of contents) class.
use FlatFile::DataStore::Toc; my $toc; $toc = FlatFile::DataStore::Toc->new( { int => 10, datastore => $datastore_obj } ); # or $toc = FlatFile::DataStore::Toc->new( { num => "A", # same as int=>10 datastore => $datastore_obj } );
FlatFile::DataStore::Toc is a Perl module that implements a flatfile datastore TOC (table of contents) class.
This module is used by FlatFile::DataStore. You will likely never call any of it's methods yourself.
FlatFile::DataStore::Toc version 1.03
Constructs a new FlatFile::DataStore::Toc object from a toc record string in a tocfile.
The parm $parms is a hash reference containing these required keys:
$parms
- datastore ... data store object, and one of: - int ... data file number as integer, or - num ... data file number as number in number base
An int or num of 0 will load the first (totals) line from the tocfile.
int
num
Returns the toc object as a string, appropriate for writing back to the tocfile.
The following read/write methods set and return their respective attribute values if $value is given. Otherwise, they just return the value.
$value
$record->datastore( [$value] ) $record->string( [$value] )
The following methods expect an integer parm and return an integer value (even though these are stored in the tocfile as numbers in their respective bases).
$record->datafnum( [$value] ) $record->keyfnum( [$value] ) $record->tocfnum( [$value] ) $record->numrecs( [$value] ) $record->keynum( [$value] ) $record->transnum( [$value] ) $record->create( [$value] ) $record->oldupd( [$value] ) $record->update( [$value] ) $record->olddel( [$value] ) $record->delete( [$value] )
Brad Baxter, <bbaxter@cpan.org>
Copyright (C) 2011 by Brad Baxter
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install FlatFile::DataStore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FlatFile::DataStore
CPAN shell
perl -MCPAN -e shell install FlatFile::DataStore
For more information on module installation, please visit the detailed CPAN module installation guide.