Palm::PDB: How to compose a PDB?

Discussion in 'Perl Misc' started by Josef Moellers, Aug 16, 2007.

  1. Hi,

    I am trying to convert between a Palm PDB "database" file and a CSV file.
    Reading the PDB and writing the CSV is pretty easy: I write a helper
    class which exports the ParseAppInfoBlock() and ParseRecord() methods
    and registers itself by calling Palm::pDB::RegisterPDBHandlers().
    However, when trying to write a PDB file, I get the error message

    Can't locate object method "PackAppInfoBlock" via package "Palm::pDB" at
    /usr/local/share/perl/5.8.8/Palm/PDB.pm line 1080.

    My helper file does define a PackAppInfoBlock() method, but, apparently,
    this isn't picked up by Palm::pDB.

    Here's an attempt at a minimal script which requires Palm::pDB (my
    version is PDB.pm,v 1.36).

    #! /usr/bin/perl

    BEGIN { unshift @INC, '.' }
    use warnings;
    use strict;
    use Palm::pDB;
    use DBOSDB00;

    my $dst = Palm::pDB->new({ name => 'TEST',
    creator => 'DBOS',
    type => 'DB00'});

    $dst->Write('TEST.pdb');
    exit 0;


    This module to be placed in same directory as main script

    package DBOSDB00;

    use warnings;
    use strict;
    use Palm::pDB;

    sub import {
    print STDERR "import of DBOSDB00\n";
    &Palm::pDB::RegisterPDBHandlers(__PACKAGE__, [ "DBOS", "DB00" ]);
    }

    sub PackAppInfoBlock {
    my ($self) = @_;
    my $appinfo;

    # construct appinfo from $self->{appinfo}

    return $appinfo;
    }
    1;

    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html
    Josef Moellers, Aug 16, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. [XaToA]

    compose date

    [XaToA], Aug 8, 2003, in forum: Java
    Replies:
    1
    Views:
    408
    Roedy Green
    Aug 8, 2003
  2. Replies:
    2
    Views:
    1,627
    Adrienne Boswell
    Jul 28, 2006
  3. DaVinci

    how to compose the two expression to one?

    DaVinci, Apr 6, 2006, in forum: C Programming
    Replies:
    4
    Views:
    320
    Duncan Muirhead
    Apr 6, 2006
  4. psyshrike
    Replies:
    0
    Views:
    143
    psyshrike
    Sep 3, 2003
  5. p cooper

    Palm::PDB problem

    p cooper, May 14, 2005, in forum: Perl Misc
    Replies:
    0
    Views:
    64
    p cooper
    May 14, 2005
Loading...

Share This Page