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 SECURITY AND PORTABILITY 35 36B<Do not accept GDBM files from untrusted sources.> 37 38GDBM files are not portable across platforms. 39 40The GDBM documentation doesn't imply that files from untrusted sources 41can be safely used with C<libgdbm>. 42 43A maliciously crafted file might cause perl to crash or even expose a 44security vulnerability. 45 46=head1 BUGS 47 48The available functions and the gdbm/perl interface need to be documented. 49 50The GDBM error number and error message interface needs to be added. 51 52=head1 SEE ALSO 53 54L<perl(1)>, L<DB_File(3)>, L<perldbmfilter>. 55 56=cut 57 58package GDBM_File; 59 60use strict; 61use warnings; 62our($VERSION, @ISA, @EXPORT); 63 64require Carp; 65require Tie::Hash; 66require Exporter; 67require 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 90XSLoader::load(); 91 921; 93