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.
|