From: Paul Marquess Date: Wed, 18 Dec 1996 10:37:58 +0000 (+0000) Subject: DB_File 1.09 patch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18d2dc8c79d95eb6c44a7de3c7011396fa783741;p=p5sagit%2Fp5-mst-13.2.git DB_File 1.09 patch private-msgid: <9612181037.AA10123@claudius.bfsec.bt.co.uk> --- diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index ea77c32..fe9c34d 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 for a discussion on the use of C 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 821eaae..a13eaa6 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