summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Marquess <pmarquess@bfsec.bt.co.uk>1996-12-18 10:37:58 +0000
committerChip Salzenberg <chip@atlantic.net>1996-12-19 16:44:00 +1200
commit18d2dc8c79d95eb6c44a7de3c7011396fa783741 (patch)
tree7d0a42eda661987348557178a07c9bc381b02a79
parent441496b2b4814536730a7c97d893a728a76c0c9d (diff)
downloadperl-18d2dc8c79d95eb6c44a7de3c7011396fa783741.tar.gz
DB_File 1.09 patch
private-msgid: <9612181037.AA10123@claudius.bfsec.bt.co.uk>
-rw-r--r--ext/DB_File/DB_File.pm31
-rw-r--r--ext/DB_File/DB_File.xs7
2 files changed, 23 insertions, 15 deletions
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index ea77c32366..fe9c34dd14 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -1,8 +1,8 @@
# DB_File.pm -- Perl 5 interface to Berkeley DB
#
# written by Paul Marquess (pmarquess@bfsec.bt.co.uk)
-# last modified 3rd Dec 1996
-# version 1.08
+# last modified 18th Dec 1996
+# version 1.09
#
# Copyright (c) 1995, 1996 Paul Marquess. All rights reserved.
# This program is free software; you can redistribute it and/or
@@ -92,16 +92,16 @@ sub EXISTS
sub NotHere
{
- my $pkg = shift ;
+ my $self = shift ;
my $method = shift ;
- croak "${pkg} does not define the method ${method}" ;
+ croak ref($self) . " does not define the method ${method}" ;
}
sub DESTROY { undef %{$_[0]} }
-sub FIRSTKEY { my $self = shift ; $self->NotHere(ref $self, "FIRSTKEY") }
-sub NEXTKEY { my $self = shift ; $self->NotHere(ref $self, "NEXTKEY") }
-sub CLEAR { my $self = shift ; $self->NotHere(ref $self, "CLEAR") }
+sub FIRSTKEY { my $self = shift ; $self->NotHere("FIRSTKEY") }
+sub NEXTKEY { my $self = shift ; $self->NotHere("NEXTKEY") }
+sub CLEAR { my $self = shift ; $self->NotHere("CLEAR") }
package DB_File::RECNOINFO ;
@@ -146,7 +146,7 @@ use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO) ;
use Carp;
-$VERSION = "1.08" ;
+$VERSION = "1.09" ;
#typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
$DB_BTREE = new DB_File::BTREEINFO ;
@@ -217,10 +217,10 @@ sub AUTOLOAD {
sub import {
my $pkg = shift;
my $callpkg = caller;
- Exporter::export $pkg, $callpkg;
+ Exporter::export $pkg, $callpkg, @_;
eval {
require Fcntl;
- Exporter::export 'Fcntl', $callpkg;
+ Exporter::export 'Fcntl', $callpkg, '/^O_/';
};
}
@@ -507,7 +507,7 @@ common file format used, the call:
is equivalent to:
- tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0640, $DB_HASH ;
+ tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0666, $DB_HASH ;
It is also possible to omit the filename parameter as well, so the
call:
@@ -516,7 +516,7 @@ call:
is equivalent to:
- tie %A, "DB_File", undef, O_CREAT|O_RDWR, 0640, $DB_HASH ;
+ tie %A, "DB_File", undef, O_CREAT|O_RDWR, 0666, $DB_HASH ;
See L<In Memory Databases> for a discussion on the use of C<undef>
in place of a filename.
@@ -1557,6 +1557,13 @@ Fixed bug with RECNO, where bval wasn't defaulting to "\n".
Documented operation of bval.
+=item 1.09
+
+Minor bug fix in DB_File::HASHINFO, DB_File::RECNOINFO and
+DB_File::BTREEINFO.
+
+Changed default mode to 0666.
+
=back
=head1 BUGS
diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs
index 821eaaef3b..a13eaa6267 100644
--- a/ext/DB_File/DB_File.xs
+++ b/ext/DB_File/DB_File.xs
@@ -3,8 +3,8 @@
DB_File.xs -- Perl 5 interface to Berkeley DB
written by Paul Marquess (pmarquess@bfsec.bt.co.uk)
- last modified 3rd Dec 1996
- version 1.08
+ last modified 18th Dec 1996
+ version 1.09
All comments/suggestions/problems are welcome
@@ -34,6 +34,7 @@
1.06 - Minor namespace cleanup: Localized PrintBtree.
1.07 - Fixed bug with RECNO, where bval wasn't defaulting to "\n".
1.08 - No change to DB_File.xs
+ 1.09 - Default mode for dbopen changed to 0666
*/
@@ -768,7 +769,7 @@ constant(name,arg)
DB_File
-db_DoTie_(dbtype, name=undef, flags=O_CREAT|O_RDWR, mode=0640, type=DB_HASH)
+db_DoTie_(dbtype, name=undef, flags=O_CREAT|O_RDWR, mode=0666, type=DB_HASH)
char * dbtype
int flags
int mode