This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #132147) bump *DBM_File versions
[perl5.git] / ext / GDBM_File / GDBM_File.pm
1 # GDBM_File.pm -- Perl 5 interface to GNU gdbm library.
2
3 =head1 NAME
4
5 GDBM_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
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
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
27 =head1 AVAILABILITY
28
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
32 L<http://www.gnu.org/order/ftp.html>.
33
34 =head1 SECURITY AND PORTABILITY
35
36 B<Do not accept GDBM files from untrusted sources.>
37
38 GDBM files are not portable across platforms.
39
40 The GDBM documentation doesn't imply that files from untrusted sources
41 can be safely used with C<libgdbm>.
42
43 A maliciously crafted file might cause perl to crash or even expose a
44 security vulnerability.
45
46 =head1 BUGS
47
48 The available functions and the gdbm/perl interface need to be documented.
49
50 The GDBM error number and error message interface needs to be added.
51
52 =head1 SEE ALSO
53
54 L<perl(1)>, L<DB_File(3)>, L<perldbmfilter>. 
55
56 =cut
57
58 package GDBM_File;
59
60 use strict;
61 use warnings;
62 our($VERSION, @ISA, @EXPORT);
63
64 require Carp;
65 require Tie::Hash;
66 require Exporter;
67 require XSLoader;
68 @ISA = qw(Tie::Hash Exporter);
69 @EXPORT = qw(
70         GDBM_CACHESIZE
71         GDBM_CENTFREE
72         GDBM_COALESCEBLKS
73         GDBM_FAST
74         GDBM_FASTMODE
75         GDBM_INSERT
76         GDBM_NEWDB
77         GDBM_NOLOCK
78         GDBM_OPENMASK
79         GDBM_READER
80         GDBM_REPLACE
81         GDBM_SYNC
82         GDBM_SYNCMODE
83         GDBM_WRCREAT
84         GDBM_WRITER
85 );
86
87 # This module isn't dual life, so no need for dev version numbers.
88 $VERSION = '1.18';
89
90 XSLoader::load();
91
92 1;