in reply to Perl and Palm Files

Hi, I've has some fairly good experiences with the p5-Palm modules. I've written up some applications with it. The most complex one can be found on my site. Anyway ... what you'll want to look into is the Palm::PDB and the Palm::Raw modules. An outline of what you need to do is the following ...:
use Palm::PDB; use palm::Raw; use constant PDB_NAME => 'TimesheetDB'; # the name use constant PDB_TYPE => 'data'; # just data use constant PDB_CREATORID => 'TiSh'; # get one from Palm use constant PDB_VERSION => 261; # just a version number use constant PDB_MODIFICATION => 350; # a mod number use constant PDB_BASEID => 14360577; # you can leave this blank my $PDB = Palm::Raw->new(); $PDB->{"name"} = PDB_NAME; $PDB->{"type"} = PDB_TYPE; $PDB->{"creator"} = PDB_CREATORID; $PDB->{"attributes"}{"backup"} = 1; $PDB->{"version"} = PDB_VERSION; $PDB->{"modnum"} = PDB_MODIFICATION; my $record = $PDB->new_Record; $record->{"data"} = 'anything you want in here'; $record->{"id"} = $id++; # can do that ... do not need to $PDB->append_Record( $record ); $PDB->Write($filename);
So, this just generates the PDB, no you'll want to synchronise it also ... an execellent way to do is to use the coldsync package. Actually the p5-Palm utilities are from the creator of the coldsync package. You can have conduits (like in hotsync) completely written in Perl. You also can synchronise from you cradle, using Ir or doing fancy stuff like a network hotsync over a modem ...

Perl is actually a nice fit for writing conduits, as the real challenge is to talk to a system that needs to store the data entered on a Palm. Perl is the ultimate system integration language anyway ;-)

regards, Johan

Replies are listed 'Best First'.
Re: Re: Perl and Palm Files
by p1boz81 (Initiate) on May 22, 2003 at 18:16 UTC
    Johan, nice example to start with. I'm just starting in Palm programming and are using perl to retrieve data from a SQL Server. You are talking about sychronization and a way to do that using coldsync. Can you perhaps shoot me some example perl conduits. Very simple ones to start with. Thanks in advance.