8 our @ISA = qw(Tie::Hash);
11 XSLoader::load 'ODBM_File', $VERSION;
19 ODBM_File - Tied access to odbm files
23 use Fcntl; # For O_RDWR, O_CREAT, etc.
26 # Now read and change the hash
27 $h{newkey} = newvalue;
35 C<ODBM_File> establishes a connection between a Perl hash variable and
36 a file in ODBM_File format;. You can manipulate the data in the file
37 just as if it were in a Perl hash, but when your program exits, the
38 data will remain in the file, to be used the next time your program
41 Use C<ODBM_File> with the Perl built-in C<tie> function to establish
42 the connection between the variable and the file. The arguments to
49 The hash variable you want to tie.
53 The string C<"ODBM_File">. (Ths tells Perl to use the C<ODBM_File>
54 package to perform the functions of the hash.)
58 The name of the file you want to tie to the hash.
68 Read-only access to the data in the file.
72 Write-only access to the data in the file.
76 Both read and write access.
80 If you want to create the file if it does not exist, add C<O_CREAT> to
81 any of these, as in the example. If you omit C<O_CREAT> and the file
82 does not already exist, the C<tie> call will fail.
86 The default permissions to use if a new file is created. The actual
87 permissions will be modified by the user's umask, so you should
88 probably use 0666 here. (See L<perlfunc/umask>.)
94 On failure, the C<tie> call returns an undefined value and probably
95 sets C<$!> to contain the reason the file could not be tied.
97 =head2 C<odbm store returned -1, errno 22, key "..." at ...>
99 This warning is emmitted when you try to store a key or a value that
100 is too long. It means that the change was not recorded in the
101 database. See BUGS AND WARNINGS below.
103 =head1 BUGS AND WARNINGS
105 There are a number of limits on the size of the data that you can
106 store in the ODBM file. The most important is that the length of a
107 key, plus the length of its associated value, may not exceed 1008
110 See L<perlfunc/tie>, L<perldbmfilter>, L<Fcntl>