HandyKit v2.1  

 Online
 Index page
 HowTo

HandyKIT packages

 HandyCGI.pm
 HandyList.pm
 HandyMail.pm
 HandyTemplate.pm
 HandyTextDB.pm
 SiteBag.pm

Other packages

 HandySQL.pm
 HandyLog.pm
 HandyCrypt.pm

NAME

HandyTextDB is a package that allows you to access extremly simple tables in files.


SYNOPSIS

# When altering table

my $rows = &TDB_lock('filename');
$rows->[5][7] = 'altering row 5 column 7';
&TDB_unlock($rows);

# When getting data from file

my $rows = &TDB_get('filename');
print $rows->[5][7];


DESCRIPTION

TDB_lock($filename)
Locks table named by file $filename. Returns $rows, which represents rows, used in table. $rows->[0] is a special row, that contains information for later use of TDB_unlock, so your table starts from $rows->[1] and so...

TDB_unlock($rows)
Unlocks previously locked table and stores data.

TDB_get($filename)
Reads data from table, but this call does not lock table. Use it for read-only access, because it will work faster in multi-request environment.



TOP
© 2000 || Perl4YOU.com E-mail: info@perl4you.com