Commit | Line | Data |
---|---|---|
4633a7c4 | 1 | # GDBM_File.pm -- Perl 5 interface to GNU gdbm library. |
bd81798f | 2 | |
4633a7c4 LW |
3 | =head1 NAME |
4 | ||
5 | GDBM_File - Perl5 access to the gdbm library. | |
6 | ||
7 | =head1 SYNOPSIS | |
8 | ||
9 | use GDBM_File ; | |
02c45c47 | 10 | tie %hash, 'GDBM_File', $filename, &GDBM_WRCREAT, 0640; |
4633a7c4 LW |
11 | # Use the %hash array. |
12 | untie %hash ; | |
13 | ||
14 | =head1 DESCRIPTION | |
15 | ||
16 | B<GDBM_File> is a module which allows Perl programs to make use of the | |
17 | facilities provided by the GNU gdbm library. If you intend to use this | |
18 | module you should really have a copy of the gdbm manualpage at hand. | |
19 | ||
20 | Most of the libgdbm.a functions are available through the GDBM_File | |
21 | interface. | |
22 | ||
3752113a Z |
23 | Unlike Perl's built-in hashes, it is not safe to C<delete> the current |
24 | item from a GDBM_File tied hash while iterating over it with C<each>. | |
25 | This is a limitation of the gdbm library. | |
26 | ||
4633a7c4 LW |
27 | =head1 AVAILABILITY |
28 | ||
16c2cc08 RA |
29 | gdbm is available from any GNU archive. The master site is |
30 | C<ftp.gnu.org>, but you are strongly urged to use one of the many | |
31 | mirrors. You can obtain a list of mirror sites from | |
8a6aac01 | 32 | L<http://www.gnu.org/order/ftp.html>. |
4633a7c4 LW |
33 | |
34 | =head1 BUGS | |
35 | ||
36 | The available functions and the gdbm/perl interface need to be documented. | |
37 | ||
6c8d78fb HS |
38 | The GDBM error number and error message interface needs to be added. |
39 | ||
4633a7c4 LW |
40 | =head1 SEE ALSO |
41 | ||
9fe6733a | 42 | L<perl(1)>, L<DB_File(3)>, L<perldbmfilter>. |
4633a7c4 LW |
43 | |
44 | =cut | |
45 | ||
a0d0e21e LW |
46 | package GDBM_File; |
47 | ||
96318ac8 | 48 | use strict; |
698828ad | 49 | use warnings; |
6642cd87 | 50 | our($VERSION, @ISA, @EXPORT); |
96318ac8 | 51 | |
a0d0e21e | 52 | require Carp; |
96318ac8 | 53 | require Tie::Hash; |
a0d0e21e | 54 | require Exporter; |
da4061d3 | 55 | require XSLoader; |
9426adcd | 56 | @ISA = qw(Tie::Hash Exporter); |
a0d0e21e LW |
57 | @EXPORT = qw( |
58 | GDBM_CACHESIZE | |
6c8d78fb HS |
59 | GDBM_CENTFREE |
60 | GDBM_COALESCEBLKS | |
a0d0e21e | 61 | GDBM_FAST |
6c8d78fb | 62 | GDBM_FASTMODE |
a0d0e21e LW |
63 | GDBM_INSERT |
64 | GDBM_NEWDB | |
8722d079 | 65 | GDBM_NOLOCK |
6c8d78fb | 66 | GDBM_OPENMASK |
a0d0e21e LW |
67 | GDBM_READER |
68 | GDBM_REPLACE | |
6c8d78fb HS |
69 | GDBM_SYNC |
70 | GDBM_SYNCMODE | |
a0d0e21e LW |
71 | GDBM_WRCREAT |
72 | GDBM_WRITER | |
73 | ); | |
74 | ||
55157468 | 75 | # This module isn't dual life, so no need for dev version numbers. |
3752113a | 76 | $VERSION = '1.17'; |
c07a80fd | 77 | |
da4061d3 | 78 | XSLoader::load(); |
a0d0e21e | 79 | |
a0d0e21e | 80 | 1; |