Debian Codegraph @

examples/pdbdump

raw
1 #!/usr/bin/perl
2 #
3 # Dump a Palm PDB or PRC database.
4
5 use strict;
6 use Palm::PDB;
7 use Palm::Raw;
8
9 # Load handlers for the built-in apps by default
10 use Palm::Memo;
11 use Palm::Address;
12 use Palm::Datebook;
13 use Palm::Mail;
14 use Palm::ToDo;
15
16 use vars qw( %PDBHandlers %PRCHandlers $hexdump );
17
18 our $VERSION = '1.400'; # VERSION
19
20 *PDBHandlers = *Palm::PDB::PDBHandlers;
21 *PRCHandlers = *Palm::PDB::PRCHandlers;
22
23 &Palm::PDB::RegisterPRCHandlers("Palm::Raw",
24 [ "", "" ]
25 );
26
27 $hexdump = 1; # By default, print hex dumps of everything
28
29 # Parse command-line arguments
30 my $arg;
31 while (($arg = $ARGV[0]) =~ /^-/)
32 {
33 $arg = shift;
34
35 if (($arg eq "-h") || ($arg eq "-help") || ($arg eq "--help"))
36 {
37 print <<EOT;
38 Usage: $0 [options] pdb-file
39 Options:
40 -h, -help, --help This message.
41 -nohex Don't print hex dumps
42 -M<module> Load <module> (e.g., -MPalm::Address)
43 EOT
44 #'
45 exit 0;
46 } elsif ($arg =~ /^-M/)
47 {
48 eval "use $';";
49 } elsif ($arg eq "-nohex")
50 {
51 $hexdump = 0;
52 } else {
53 die "Unrecognized option: $arg\n";
54 }
55 }
56
57 my $fname = shift;
58
59 die "No such file: $fname\n" if ! -f $fname;
60
61 my $EPOCH_1904 = 2082844800; # Difference between Palm's
62 # epoch (Jan. 1, 1904) and
63 # Unix's epoch (Jan. 1, 1970),
64 # in seconds.
65 my $HeaderLen = 32+2+2+(9*4); # Size of database header
66 my $RecIndexHeaderLen = 6; # Size of record index header
67 my $IndexRecLen = 8; # Length of record index entry
68 my $IndexRsrcLen = 10; # Length of resource index entry
69
70 #%PDBHandlers = (); # Record handler map
71 #%PRCHandlers = (); # Resource handler map
72
73
74 #&Palm::PDB::rawread($fname);
75 &rawread($fname);
76
77 #package Palm::PDB; # XXX - Gross hack!
78 sub rawread
79 {
80 my $self = new Palm::Raw;
81 my $fname = shift; # Filename to read from
82 my $buf; # Buffer into which to read stuff
83
84 # Open database file
85 open PDB, "< $fname" or die "Can't open \"$fname\": $!\n";
86 binmode PDB; # Parse as binary file under MS-DOS
87
88 # Get the size of the file. It'll be useful later
89 seek PDB, 0, 2; # 2 == SEEK_END. Seek to the end.
90 $self->{_size} = tell PDB;
91 print "File size: $self->{_size}\n";
92 seek PDB, 0, 0; # 0 == SEEK_START. Rewind to the beginning.
93
94 # Read header
95 my $name;
96 my $attributes;
97 my $version;
98 my $ctime;
99 my $mtime;
100 my $baktime;
101 my $modnum;
102 my $appinfo_offset;
103 my $sort_offset;
104 my $type;
105 my $creator;
106 my $uniqueIDseed;
107
108 read PDB, $buf, $HeaderLen; # Read the PDB header
109 print "Database header:\n";
110 if ($hexdump)
111 {
112 &hexdump(" ", $buf);
113 print "\n";
114 }
115
116 # Split header into its component fields
117 ($name, $attributes, $version, $ctime, $mtime, $baktime,
118 $modnum, $appinfo_offset, $sort_offset, $type, $creator,
119 $uniqueIDseed) =
120 unpack "a32 n n N N N N N N a4 a4 N", $buf;
121
122 ($self->{name} = $name) =~ s/\0*$//;
123 $self->{attributes}{resource} = 1 if $attributes & 0x0001;
124 $self->{attributes}{"read-only"} = 1 if $attributes & 0x0002;
125 $self->{attributes}{"AppInfo dirty"} = 1 if $attributes & 0x0004;
126 $self->{attributes}{backup} = 1 if $attributes & 0x0008;
127 $self->{attributes}{"OK newer"} = 1 if $attributes & 0x0010;
128 $self->{attributes}{reset} = 1 if $attributes & 0x0020;
129 $self->{attributes}{open} = 1 if $attributes & 0x0040;
130 $self->{attributes}{launchable} = 1 if $attributes & 0x0200;
131 $self->{version} = $version;
132 $self->{ctime} = $ctime - $EPOCH_1904;
133 $self->{mtime} = $mtime - $EPOCH_1904;
134 $self->{baktime} = $baktime - $EPOCH_1904;
135 $self->{modnum} = $modnum;
136 # _appinfo_offset and _sort_offset are private fields
137 $self->{_appinfo_offset} = $appinfo_offset;
138 $self->{_sort_offset} = $sort_offset;
139 $self->{type} = $type;
140 $self->{creator} = $creator;
141 $self->{uniqueIDseed} = $uniqueIDseed;
142
143 print <<EOT;
144 Name: $name
145 Attributes: @{[sprintf("0x%02x", $attributes)]}
146 EOT
147 print " "x19;
148 print " LAUNCHABLE" if $self->{attributes}{launchable};
149 print " OPEN" if $self->{attributes}{open};
150 print " RESET" if $self->{attributes}{reset};
151 print " OKNEWER" if $self->{attributes}{"OK newer"};
152 print " BACKUP" if $self->{attributes}{backup};
153 print " APPINFO-DIRTY" if $self->{attributes}{"AppInfo dirty"};
154 print " READ-ONLY" if $self->{attributes}{"read-only"};
155 print " RESOURCE" if $self->{attributes}{resource};
156 print "\n";
157 print <<EOT;
158 Version: $version
159 Ctime: $ctime @{[scalar(localtime($ctime-$EPOCH_1904))]}
160 Mtime: $mtime @{[scalar(localtime($mtime-$EPOCH_1904))]}
161 Backup time: $baktime @{[scalar(localtime($baktime-$EPOCH_1904))]}
162 Mod number: $modnum
163 AppInfo offset: $appinfo_offset
164 Sort offset: $sort_offset
165 Type: $type
166 Creator: $creator
167 Unique ID seed: $uniqueIDseed
168
169 EOT
170
171 # Rebless this PDB object, depending on its type and/or
172 # creator. This allows us to magically invoke the proper
173 # &Parse*() function on the various parts of the database.
174
175 # Look for most specific handlers first, least specific ones
176 # last. That is, first look for a handler that deals
177 # specifically with this database's creator and type, then for
178 # one that deals with this database's creator and any type,
179 # and finally for one that deals with anything.
180
181 my $handler;
182 if ($self->{attributes}{resource})
183 {
184 # Look among resource handlers
185 $handler = $PRCHandlers{$self->{creator}}{$self->{type}} ||
186 $PRCHandlers{undef}{$self->{type}} ||
187 $PRCHandlers{$self->{creator}}{""} ||
188 $PRCHandlers{""}{""};
189 } else {
190 # Look among record handlers
191 $handler = $PDBHandlers{$self->{creator}}{$self->{type}} ||
192 $PDBHandlers{""}{$self->{type}} ||
193 $PDBHandlers{$self->{creator}}{""} ||
194 $PDBHandlers{""}{""};
195 }
196
197 if (defined($handler))
198 {
199 bless $self, $handler;
200 } else {
201 # XXX - This should probably return 'undef' or something,
202 # rather than die.
203 die "No handler defined for creator \"$creator\", type \"$type\"\n";
204 }
205
206 ## Read record/resource index
207 # Read index header
208 read PDB, $buf, $RecIndexHeaderLen;
209 print "Record/resource index header:\n";
210 if ($hexdump)
211 {
212 &hexdump(" ", $buf);
213 print "\n";
214 }
215
216 my $next_index;
217 my $numrecs;
218
219 ($next_index, $numrecs) = unpack "N n", $buf;
220 $self->{_numrecs} = $numrecs;
221
222 print <<EOT;
223 Next index: $next_index
224 # records: $numrecs
225
226 EOT
227
228 # Read the index itself
229 if ($self->{attributes}{resource})
230 {
231 &_load_rsrc_index($self, \*PDB);
232 } else {
233 &_load_rec_index($self, \*PDB);
234 }
235
236 # Ignore the two NUL bytes that are usually here. We'll seek()
237 # around them later.
238
239 # Read AppInfo block, if it exists
240 if ($self->{_appinfo_offset} != 0)
241 {
242 &_load_appinfo_block($self, \*PDB);
243 }
244
245 # Read sort block, if it exists
246 if ($self->{_sort_offset} != 0)
247 {
248 &_load_sort_block($self, \*PDB);
249 }
250
251 # Read record/resource list
252 if ($self->{attributes}{resource})
253 {
254 &_load_resources($self, \*PDB);
255 } else {
256 &_load_records($self, \*PDB);
257 }
258
259 # These keys were needed for parsing the file, but are not
260 # needed any longer. Delete them.
261 delete $self->{_index};
262 delete $self->{_numrecs};
263 delete $self->{_appinfo_offset};
264 delete $self->{_sort_offset};
265 delete $self->{_size};
266
267 close PDB;
268 }
269
270
271 # _load_rec_index
272 # Private function. Read the record index, for a record database
273 sub _load_rec_index
274 {
275 my $pdb = shift;
276 my $fh = shift; # Input file handle
277 my $i;
278 my $lastoffset = 0;
279
280 print "Record index:\n";
281
282 # Read each record index entry in turn
283 for ($i = 0; $i < $pdb->{_numrecs}; $i++)
284 {
285 my $buf; # Input buffer
286
287 print " Record index entry $i\n";
288
289 # Read the next record index entry
290 my $offset;
291 my $attributes;
292 my @id; # Raw ID
293 my $id; # Numerical ID
294 my $entry = {}; # Parsed index entry
295
296 read $fh, $buf, $IndexRecLen;
297 if ($hexdump)
298 {
299 &hexdump(" ", $buf);
300 print "\n";
301 }
302
303 # The ID field is a bit weird: it's represented as 3
304 # bytes, but it's really a double word (long) value.
305
306 ($offset, $attributes, @id) = unpack "N C C3", $buf;
307 if ($offset == $lastoffset)
308 {
309 print STDERR "Record $i has same offset as previous one: $offset\n";
310 }
311 $lastoffset = $offset;
312
313 $entry->{offset} = $offset;
314 $entry->{attributes}{expunged} = 1 if $attributes & 0x80;
315 $entry->{attributes}{dirty} = 1 if $attributes & 0x40;
316 $entry->{attributes}{deleted} = 1 if $attributes & 0x20;
317 $entry->{attributes}{private} = 1 if $attributes & 0x10;
318 $entry->{id} = ($id[0] << 16) |
319 ($id[1] << 8) |
320 $id[2];
321
322 # The lower 4 bits of the attributes field are
323 # overloaded: If the record has been deleted and/or
324 # expunged, then bit 0x08 indicates whether the record
325 # should be archived. Otherwise (if it's an ordinary,
326 # non-deleted record), the lower 4 bits specify the
327 # category that the record belongs in.
328 if (($attributes & 0xa0) == 0)
329 {
330 $entry->{category} = $attributes & 0x0f;
331 } else {
332 $entry->{attributes}{archive} = 1
333 if $attributes & 0x08;
334 }
335
336 print <<EOT;
337 Offset: $offset
338 Attributes: @{[sprintf("0x%02x", $attributes), keys %{$entry->{attributes}}]}
339 Category: $entry->{category}
340 ID: @{[sprintf("0x%02x%02x%02x", @id)]}
341
342 EOT
343
344 # Put this information on a temporary array
345 push @{$pdb->{_index}}, $entry;
346 }
347 }
348
349 # XXX - Make this print out debugging information
350 # _load_rsrc_index
351 # Private function. Read the resource index, for a resource database
352 sub _load_rsrc_index
353 {
354 my $pdb = shift;
355 my $fh = shift; # Input file handle
356 my $i;
357
358 print "Resource index:\n";
359
360 # Read each resource index entry in turn
361 for ($i = 0; $i < $pdb->{_numrecs}; $i++)
362 {
363 my $buf; # Input buffer
364
365 print " Resource index entry $i\n";
366
367 # Read the next resource index entry
368 my $type;
369 my $id;
370 my $offset;
371 my $entry = {}; # Parsed index entry
372
373 read $fh, $buf, $IndexRsrcLen;
374 if ($hexdump)
375 {
376 &hexdump(" ", $buf);
377 print "\n";
378 }
379
380 ($type, $id, $offset) = unpack "a4 n N", $buf;
381
382 $entry->{type} = $type;
383 $entry->{id} = $id;
384 $entry->{offset} = $offset;
385
386 print <<EOT;
387 Offset: $offset
388 ID: $id
389 Type: $type
390
391 EOT
392
393 push @{$pdb->{_index}}, $entry;
394 }
395 }
396
397 # _load_appinfo_block
398 # Private function. Read the AppInfo block
399 sub _load_appinfo_block
400 {
401 my $pdb = shift;
402 my $fh = shift; # Input file handle
403 my $len; # Length of AppInfo block
404 my $buf; # Input buffer
405
406 print "AppInfo block:\n";
407
408 # Sanity check: make sure we're positioned at the beginning of
409 # the AppInfo block
410 if (tell($fh) > $pdb->{_appinfo_offset})
411 {
412 die "Bad AppInfo offset: expected ",
413 sprintf("0x%08x", $pdb->{_appinfo_offset}),
414 ", but I'm at ",
415 tell($fh), "\n";
416 }
417
418 # Seek to the right place, if necessary
419 if (tell($fh) != $pdb->{_appinfo_offset})
420 {
421 seek PDB, $pdb->{_appinfo_offset}, 0;
422 }
423
424 # There's nothing that explicitly gives the size of the
425 # AppInfo block. Rather, it has to be inferred from the offset
426 # of the AppInfo block (previously recorded in
427 # $pdb->{_appinfo_offset}) and whatever's next in the file.
428 # That's either the sort block, the first data record, or the
429 # end of the file.
430
431 if ($pdb->{_sort_offset})
432 {
433 # The next thing in the file is the sort block
434 $len = $pdb->{_sort_offset} - $pdb->{_appinfo_offset};
435 } elsif ((defined $pdb->{_index}) && @{$pdb->{_index}})
436 {
437 # There's no sort block; the next thing in the file is
438 # the first data record
439 $len = $pdb->{_index}[0]{offset} -
440 $pdb->{_appinfo_offset};
441 } else {
442 # There's no sort block and there are no records. The
443 # AppInfo block goes to the end of the file.
444 $len = $pdb->{_size} - $pdb->{_appinfo_offset};
445 }
446
447 # Read the AppInfo block
448 read $fh, $buf, $len;
449 if ($hexdump)
450 {
451 &hexdump(" ", $buf);
452 print "\n";
453 }
454
455 # Tell the real class to parse the AppInfo block
456 $pdb->{appinfo} = $pdb->ParseAppInfoBlock($buf);
457
458 # Print out the parsed values
459 if (ref($pdb->{appinfo}) ne "")
460 {
461 &dumphash($pdb->{appinfo}, "\t");
462 print "\n";
463 }
464 }
465
466 # _load_sort_block
467 # Private function. Read the sort block.
468 sub _load_sort_block
469 {
470 my $pdb = shift;
471 my $fh = shift; # Input file handle
472 my $len; # Length of sort block
473 my $buf; # Input buffer
474
475 print "Sort block:\n";
476
477 # Sanity check: make sure we're positioned at the beginning of
478 # the sort block
479 if (tell($fh) > $pdb->{_sort_offset})
480 {
481 die "Bad sort block offset: expected ",
482 sprintf("0x%08x", $pdb->{_sort_offset}),
483 ", but I'm at ",
484 tell($fh), "\n";
485 }
486
487 # Seek to the right place, if necessary
488 if (tell($fh) != $pdb->{_sort_offset})
489 {
490 seek PDB, $pdb->{_sort_offset}, 0;
491 }
492
493 # There's nothing that explicitly gives the size of the sort
494 # block. Rather, it has to be inferred from the offset of the
495 # sort block (previously recorded in $pdb->{_sort_offset})
496 # and whatever's next in the file. That's either the first
497 # data record, or the end of the file.
498
499 if (defined($pdb->{_index}))
500 {
501 # The next thing in the file is the first data record
502 $len = $pdb->{_index}[0]{offset} -
503 $pdb->{_sort_offset};
504 } else {
505 # There are no records. The sort block goes to the end
506 # of the file.
507 $len = $pdb->{_size} - $pdb->{_sort_offset};
508 }
509
510 # Read the AppInfo block
511 read $fh, $buf, $len;
512 if ($hexdump)
513 {
514 &hexdump(" ", $buf);
515 print "\n";
516 }
517
518 # XXX - Check to see if the sort block has some predefined
519 # structure. If so, it might be a good idea to parse the sort
520 # block here.
521
522 # Tell the real class to parse the sort block
523 $pdb->{sort} = $pdb->ParseSortBlock($buf);
524 }
525
526 # _load_records
527 # Private function. Load the actual data records, for a record database
528 # (PDB)
529 sub _load_records
530 {
531 my $pdb = shift;
532 my $fh = shift; # Input file handle
533 my $i;
534
535 print "Records:\n";
536 # Read each record in turn
537 for ($i = 0; $i < $pdb->{_numrecs}; $i++)
538 {
539 my $len; # Length of record
540 my $buf; # Input buffer
541
542 print " Record $i\n";
543
544 # Sanity check: make sure we're where we think we
545 # should be.
546 if (tell($fh) > $pdb->{_index}[$i]{offset})
547 {
548 # XXX - The two NULs are really optional.
549 # die "Bad offset for record $i: expected ",
550 # sprintf("0x%08x",
551 # $pdb->{_index}[$i]{offset}),
552 # " but it's at ",
553 # sprintf("[0x%08x]", tell($fh)), "\n";
554 }
555
556 # Seek to the right place, if necessary
557 if (tell($fh) != $pdb->{_index}[$i]{offset})
558 {
559 seek PDB, $pdb->{_index}[$i]{offset}, 0;
560 }
561
562 # Compute the length of the record: the last record
563 # extends to the end of the file. The others extend to
564 # the beginning of the next record.
565 if ($i == $pdb->{_numrecs} - 1)
566 {
567 # This is the last record
568 $len = $pdb->{_size} -
569 $pdb->{_index}[$i]{offset};
570 } else {
571 # This is not the last record
572 $len = $pdb->{_index}[$i+1]{offset} -
573 $pdb->{_index}[$i]{offset};
574 }
575
576 # Read the record
577 read $fh, $buf, $len;
578 if ($hexdump)
579 {
580 &hexdump(" ", $buf);
581 print "\n";
582 }
583
584 # Tell the real class to parse the record data. Pass
585 # &ParseRecord all of the information from the index,
586 # plus a "data" field with the raw record data.
587 my $record;
588
589 $record = $pdb->ParseRecord(
590 %{$pdb->{_index}[$i]},
591 "data" => $buf,
592 );
593 push @{$pdb->{records}}, $record;
594
595 # Print out the parsed values
596 &dumphash($record, "\t");
597 print "\n";
598 }
599 }
600
601 # _load_resources
602 # Private function. Load the actual data resources, for a resource database
603 # (PRC)
604 sub _load_resources
605 {
606 my $pdb = shift;
607 my $fh = shift; # Input file handle
608 my $i;
609
610 print "Resources:\n";
611 # Read each resource in turn
612 for ($i = 0; $i < $pdb->{_numrecs}; $i++)
613 {
614 my $len; # Length of record
615 my $buf; # Input buffer
616
617 print " Resource $i\n";
618
619 # Sanity check: make sure we're where we think we
620 # should be.
621 if (tell($fh) > $pdb->{_index}[$i]{offset})
622 {
623 die "Bad offset for resource $i: expected ",
624 sprintf("0x%08x",
625 $pdb->{_index}[$i]{offset}),
626 " but it's at ",
627 sprintf("0x%08x", tell($fh)), "\n";
628 }
629
630 # Seek to the right place, if necessary
631 if (tell($fh) != $pdb->{_index}[$i]{offset})
632 {
633 seek PDB, $pdb->{_index}[$i]{offset}, 0;
634 }
635
636 # Compute the length of the resource: the last
637 # resource extends to the end of the file. The others
638 # extend to the beginning of the next resource.
639 if ($i == $pdb->{_numrecs} - 1)
640 {
641 # This is the last resource
642 $len = $pdb->{_size} -
643 $pdb->{_index}[$i]{offset};
644 } else {
645 # This is not the last resource
646 $len = $pdb->{_index}[$i+1]{offset} -
647 $pdb->{_index}[$i]{offset};
648 }
649
650 # Read the resource
651 read $fh, $buf, $len;
652 if ($hexdump)
653 {
654 &hexdump(" ", $buf);
655 print "\n";
656 }
657
658 # Tell the real class to parse the resource data. Pass
659 # &ParseResource all of the information from the
660 # index, plus a "data" field with the raw resource
661 # data.
662 my $resource;
663
664 $resource = $pdb->ParseResource(
665 %{$pdb->{_index}[$i]},
666 "data" => $buf,
667 );
668 push @{$pdb->{resources}}, $resource;
669
670 # Print out the parsed values
671 &dumphash($resource, "\t");
672 print "\n";
673 }
674 }
675
676 sub hexdump
677 {
678 my $prefix = shift; # What to print in front of each line
679 my $data = shift; # The data to dump
680 my $maxlines = shift; # Max # of lines to dump
681 my $offset; # Offset of current chunk
682
683 for ($offset = 0; $offset < length($data); $offset += 16)
684 {
685 my $hex; # Hex values of the data
686 my $ascii; # ASCII values of the data
687 my $chunk; # Current chunk of data
688
689 last if defined($maxlines) && ($offset >= ($maxlines * 16));
690
691 $chunk = substr($data, $offset, 16);
692
693 ($hex = $chunk) =~ s/./sprintf "%02x ", ord($&)/ges;
694
695 ($ascii = $chunk) =~ y/\040-\176/./c;
696
697 printf "%s %-48s|%-16s|\n", $prefix, $hex, $ascii;
698 }
699 }
700
701 # XXX - Ought to have a &dumparray as well. The two can call each other
702 # recursively.
703
704 sub dumphash
705 {
706 my $hash = shift;
707 my $indent = shift;
708 my $key;
709 my $value;
710
711 while (($key, $value) = each %{$hash})
712 {
713 if (ref($value) eq "HASH")
714 {
715 print $indent, $key, ":\n";
716 &dumphash($value, $indent . "\t");
717 } elsif (ref($value) eq "ARRAY")
718 {
719 my($i,$j);
720
721 print $indent, $key, ":\n";
722 for ($i = 0; $i <= $#{$value}; $i++)
723 {
724 if (ref($value->[$i]) eq "HASH")
725 {
726 print $indent, " $i:\n";
727 &dumphash($value->[$i],
728 $indent . "\t");
729 } elsif (ref($value->[$i]) eq "ARRAY")
730 {
731 my @v2 = @{$value->[$i]};
732 for ($j = 0; $j <= $#v2; $j++)
733 {
734 print $indent,
735 "\t$i-$j: [$v2[$j]]\n";
736 }
737 }else {
738 print $indent,
739 "\t$i: [$value->[$i]]\n";
740 }
741 }
742 } else {
743 print $indent, $key, " -> [", $value, "]\n";
744 }
745 }
746 }
747
748 __END__
749
750 =head1 NAME
751
752 pdbdump - Print the contents of a Palm PDB file
753
754 =head1 VERSION
755
756 This document describes version 1.400 of
757 C<pdbdump>, released March 14, 2015
758 as part of Palm version 1.400.
759
760 =head1 SYNOPSIS
761
762 C<pdbdump> I<[options]> F<filename>
763
764 =head1 DESCRIPTION
765
766 C<pdbdump> reads a S<Palm OS> F<.pdb> file, parses it, and prints its
767 contents. This includes both a hex dump of the raw data of each piece,
768 and a human-readable list of the various values, insofar as possible.
769 The aim of C<pdbdump> is to allow one to verify whether a particular
770 file is a well-formed S<Palm OS> database file and if not, where the error
771 lies.
772
773 If the database is of a known type, C<pdbdump> parses the AppInfo
774 block and records. Otherwise, it simply prints out a hex dump of their
775 contents. C<pdbdump> includes, by default, support for most of the
776 built-in applications. Other helper modules may be loaded with the
777 C<-M> option.
778
779 =head1 OPTIONS
780
781 =over 4
782
783 =item -h -help --help
784
785 Print a usage message and exit.
786
787 =item -nohex
788
789 Don't print the hex dump of the various parts.
790
791 =item -MI<module>
792
793 C<use> the named module. This can be useful for loading additional
794 helper modules.
795
796 =back
797
798 =head1 SEE ALSO
799
800 L<Palm::PDB>
801
802 =head1 CONFIGURATION AND ENVIRONMENT
803
804 main requires no configuration files or environment variables.
805
806 =head1 INCOMPATIBILITIES
807
808 None reported.
809
810 =head1 BUGS AND LIMITATIONS
811
812 C<pdbdump> only recognizes record databases (C<.pdb> files), not
813 resource databases (C<.prc> files).
814
815 =head1 AUTHORS
816
817 Andrew Arensburger C<< <arensb AT ooblick.com> >>
818
819 Currently maintained by Christopher J. Madsen C<< <perl AT cjmweb.net> >>
820
821 Please report any bugs or feature requests
822 to S<C<< <bug-Palm AT rt.cpan.org> >>>
823 or through the web interface at
824 L<< http://rt.cpan.org/Public/Bug/Report.html?Queue=Palm >>.
825
826 You can follow or contribute to p5-Palm's development at
827 L<< https://github.com/madsen/p5-Palm >>.
828
829 =head1 COPYRIGHT AND LICENSE
830
831 This software is copyright (c) 2003 by Andrew Arensburger & Alessandro Zummo.
832
833 This is free software; you can redistribute it and/or modify it under
834 the same terms as the Perl 5 programming language system itself.
835
836 =head1 DISCLAIMER OF WARRANTY
837
838 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
839 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
840 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
841 PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
842 EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
843 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
844 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
845 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
846 NECESSARY SERVICING, REPAIR, OR CORRECTION.
847
848 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
849 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
850 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
851 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
852 OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
853 THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
854 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
855 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
856 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
857 SUCH DAMAGES.
858
859 =cut