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