called whenever you want to create a new BBDB object.
my $bbdb = new BBDB();
Called to get or set all or part of a BBDB object. The parts of the
any other value in the name argument results in death. Some of these parts, namely phone, address, net, and notes have an internal structure and are returned as references to arrays. The others are returned just as strings. The optional second argument sets the part of this BBDB object to the value you provided. There is no consistency checking at this point, so be sure the value you are setting this to is correct.
This is a simple interface for reading or writing an entire BBDB
file. If called with one argument, it returns a reference to an array of BBDB
objects. Each object contains the data from the file. Thus the
number of BBDB entries equals scalar(@$bbdb) if you use:
If called with two arguments, the first is the filename to create, and the second is a reference to an array of BBDB objects, such as was returned in the one argument version. The objects are scanned for unique user defined fields, which are written out as the 2nd line in the BBDB file, and then the individual records are written out.
Takes a string as written in a BBDB file of a single BBDB record
and decodes it into its PERL representation. Returns undef if
it couldnt decode the record for some reason, otherwise returns
This is the inverse of decode. Takes an internal PERL version of
a BBDB records and returns a string which is a lisp version of the
data that BBDB understands. There are some ambiguities, noted in
If you find that some records in your BBDB file are failing to be recognized, trying setting $BBDB::debug = 1; to turn on debugging. We will then print out to STDERR the first field of the record that we were unable to recognize. Very handy for complicated BBDB records.
Henry Laxen <firstname.lastname@example.org> http://www.maztravel.com/perl
BBDB texinfo documentation
Phone numbers and zip codes may be converted from strings to integers if they are decoded and encoded. This should not affect the operation of BBDB. Also a null last name is converted from "" to nil, which also doesnt hurt anything.
You might ask why I use arrays instead of hashes to encode the data in the BBDB file. The answer is that order matters in the bbdb file, and order isnt well defined in hashes. Also, if you use hashes, at least in the simple minded way, you can easily find yourself with legitimate duplicate keys.
|perl v5.20.3||ADDRESSBOOK::DB::BBDB (3)||2000-11-28|