|
Palm::ListDB::Writer - Create databases for Palm List application |
Palm::ListDB::Writer - Create databases for Palm List application
use Palm::ListDB::Writer;
my $db = new Palm::ListDB::Writer
"MyDataBase",
"label1" => "Name",
"label2" => "Address");
$db->add("Private", "Wife", "16 Localstreet, Netcity", "Some comments");
$db->add("Public", "John Doe", "1 Main St., Connecticut", "Blah blah");
$db->write("addr.pdb");
Palm::ListDB::Writer creates databases for the Palm utility List.
Palm::ListDB::Writer can be used to create databases for the Palm utility List, a simple but convenient database application. List is written by Andrew Low (roo@magma.ca, http://www.magma.ca/~roo).
List databases consist of a collection of records, each having two label fields and one note field (arbitrary data).
The basic usage is to create a Palm::ListDB::Writer object with
attributes like the name of the database, the primary and secondary
field labels, and then add records by calling its add() method.
The write() method writes the collected data out in the form of a Palm
database.
Limitations posed by the Palm operating system and/or the List application: database name - 31 characters; field names - 15 characters; category names - 15 characters; 15 categories excluding the default (Unfiled) catagory; field values - 63 characters; length of note data - 1023 characters.
This module is not related to the Palm::ListDB manpage; the latter can also import Palm List databases, and requires some knowledge about Palm databases.
new() requires one argument, the name of the database.
Initial attributes for the database can be specified after the database name in the form of key => value pairs:
Additional methods can be added later with the add_cat() method.
add() adds records to the database.
Add() takes exactly four arguments: the category for the record, its
first field, its second field, and the note data. Fields may be left
empty (or undefined), but not all of them.
If the named category does not exists, and autocat is in effect, it is automatically added to the list of categories.
Add() returns true if the record was successfully added.
Write() takes one argument: the file name for the database.
Returns true if the database was successfully written.
http://www.magma.ca/~roo web site for the Palm List application.
Johan Vromans, <jvromans@squirrel.nl>
Copyright 2003 by Squirrel Consultancy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|
Palm::ListDB::Writer - Create databases for Palm List application |