EBook-MOBI-0.72

NAME

Palm::Doc - Handler for Palm Doc books

SYNOPSIS

use Palm::Doc;

DESCRIPTION

Helper for reading and writing Palm Doc books. The interface is based on Palm::ZText since it just makes sense. However, because of the nature of these databases, record-level processing is just a Bad Idea. Use the text and textfile calls rather than do direct access of the @records array.

new

Create a new Doc object. By default, it's not a resource database. Setting $self-{attributes}{resource}> to 1 before any manipulations will cause it to become a resource database.

text

$text = $doc->text;

Return the contents of the Doc database.

$text = $doc->text( @text );

Set the contents of the Doc book to the specified arguments. All the list arguments will simply be concatenated together.

textfile

$doc->textfile( "README.txt" );

Set the contents of the Doc to the contents of the file and sets the name of the PDB to the specified filename.

BUGS

Bookmarks are unsupported. I've never had any use for them.

Output databases are always compressed and there's no option to disable compression. I consider this a feature, to be honest.

Note On Character Sets

Palm::Doc doesn't do anything with character sets. This might be a bug, depending on how you feel about this kind of thing, but the reality is that we're generally converting between text and Doc files, neither of which are real great at telling us what encoding we're supposed to use.

My understanding of PalmOS character sets is that Doc books should be encoded in either Windows Code Page 1252 or, for Japanese, 932. Actually, the PalmOS encoding is a small variation on those. In practice, ISO 8859-1 works okay for western languages which is real nice because Encode doesn't know about the PalmOS stuff.

This gist of all this is that when you're creating a Palm::Doc, you may need to do something along the lines of: