summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl.straw/lib/GDBM_File.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-03-01 01:54:19 +0000
committerNorbert Preining <preining@logic.at>2010-03-01 01:54:19 +0000
commit904fd0757fe037dbfbf156b31f72e5ff5c7cd796 (patch)
tree36f000ab754854574aad17c01d9cd9ac739f1053 /Master/tlpkg/tlperl.straw/lib/GDBM_File.pm
parent402bd194f686177d2dfca24f7c4766434c514141 (diff)
commit more files of the tlperl.straw dir, still not complete
git-svn-id: svn://tug.org/texlive/trunk@17244 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl.straw/lib/GDBM_File.pm')
-rwxr-xr-xMaster/tlpkg/tlperl.straw/lib/GDBM_File.pm86
1 files changed, 86 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl.straw/lib/GDBM_File.pm b/Master/tlpkg/tlperl.straw/lib/GDBM_File.pm
new file mode 100755
index 00000000000..db39bfe82ac
--- /dev/null
+++ b/Master/tlpkg/tlperl.straw/lib/GDBM_File.pm
@@ -0,0 +1,86 @@
+# GDBM_File.pm -- Perl 5 interface to GNU gdbm library.
+
+=head1 NAME
+
+GDBM_File - Perl5 access to the gdbm library.
+
+=head1 SYNOPSIS
+
+ use GDBM_File ;
+ tie %hash, 'GDBM_File', $filename, &GDBM_WRCREAT, 0640;
+ # Use the %hash array.
+ untie %hash ;
+
+=head1 DESCRIPTION
+
+B<GDBM_File> is a module which allows Perl programs to make use of the
+facilities provided by the GNU gdbm library. If you intend to use this
+module you should really have a copy of the gdbm manualpage at hand.
+
+Most of the libgdbm.a functions are available through the GDBM_File
+interface.
+
+=head1 AVAILABILITY
+
+gdbm is available from any GNU archive. The master site is
+C<ftp.gnu.org>, but you are strongly urged to use one of the many
+mirrors. You can obtain a list of mirror sites from
+http://www.gnu.org/order/ftp.html.
+
+=head1 BUGS
+
+The available functions and the gdbm/perl interface need to be documented.
+
+The GDBM error number and error message interface needs to be added.
+
+=head1 SEE ALSO
+
+L<perl(1)>, L<DB_File(3)>, L<perldbmfilter>.
+
+=cut
+
+package GDBM_File;
+
+use strict;
+use warnings;
+our($VERSION, @ISA, @EXPORT, $AUTOLOAD);
+
+require Carp;
+require Tie::Hash;
+require Exporter;
+use XSLoader ();
+@ISA = qw(Tie::Hash Exporter);
+@EXPORT = qw(
+ GDBM_CACHESIZE
+ GDBM_CENTFREE
+ GDBM_COALESCEBLKS
+ GDBM_FAST
+ GDBM_FASTMODE
+ GDBM_INSERT
+ GDBM_NEWDB
+ GDBM_NOLOCK
+ GDBM_OPENMASK
+ GDBM_READER
+ GDBM_REPLACE
+ GDBM_SYNC
+ GDBM_SYNCMODE
+ GDBM_WRCREAT
+ GDBM_WRITER
+);
+
+# This module isn't dual life, so no need for dev version numbers.
+$VERSION = '1.090001';
+
+sub AUTOLOAD {
+ my($constname);
+ ($constname = $AUTOLOAD) =~ s/.*:://;
+ my ($error, $val) = constant($constname);
+ Carp::croak $error if $error;
+ no strict 'refs';
+ *{$AUTOLOAD} = sub { $val };
+ goto &{$AUTOLOAD};
+}
+
+XSLoader::load 'GDBM_File', $VERSION;
+
+1;