NAME
FlatFile::DataStore::Toc - Perl module that implements a flatfile datastore TOC (table of contents) class.
SYNOPSYS
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
} );
DESCRIPTION
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.
VERSION
FlatFile::DataStore::Toc version 1.03
CLASS METHODS
FlatFile::DataStore::Toc->new( $parms )
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:
- 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.
OBJECT METHODS
to_string()
Returns the toc object as a string, appropriate for writing back to the tocfile.
OBJECT METHODS: Accessors
The following read/write methods set and return their respective attribute values if $value
is given. Otherwise, they just return the 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] )
AUTHOR
Brad Baxter, <bbaxter@cpan.org>
COPYRIGHT AND LICENSE
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.