Brad Baxter > FlatFile-DataStore-Lite-0.01 > FlatFile::DataStore::Lite::Toc

Download:
FlatFile-DataStore-Lite-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source  

NAME ^

FlatFile::DataStore::Lite::Toc - Perl module that implements a lightweight flat file data store TOC (table of contents) class.

SYNOPSYS ^

 use FlatFile::DataStore::Lite::Toc;
 my $toc;

 $toc = FlatFile::DataStore::Lite::Toc->new( { int => 10,
     datastore => $datastore_obj } );

 # or

 $toc = FlatFile::DataStore::Lite::Toc->new( { num => "A",
     datastore => $datastore_obj } );

DESCRIPTION ^

FlatFile::DataStore::Lite::Toc is a Perl module that implements a lightweight flat file data store TOC (table of contents) class.

This module is used by FlatFile::DataStore::Lite. You will likely never call any of it's methods yourself.

VERSION ^

FlatFile::DataStore::Lite::Toc version 0.01

CLASS METHODS ^

FlatFile::DataStore::Lite::Toc->new( $parms )

Constructs a new FlatFile::DataStore::Lite::Toc object.

The parm $parms is a hash reference containing key/value pairs to populate the record string. Three keys are recognized:

 - datastore, data store object (required) and one of:
 - int, data file number as integer, will load object from tocfile
   or
 - num, data file number as number in number base, will load from tocfile

An int or num of 0 will load the first (totals) line from tocfile

OBJECT METHODS ^

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] )

AUTHOR ^

Brad Baxter, <bbaxter@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009 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.