DB_File 1.09 patch
authorPaul Marquess <pmarquess@bfsec.bt.co.uk>
Wed, 18 Dec 1996 10:37:58 +0000 (10:37 +0000)
committerChip Salzenberg <chip@atlantic.net>
Thu, 19 Dec 1996 04:44:00 +0000 (16:44 +1200)
private-msgid: <9612181037.AA10123@claudius.bfsec.bt.co.uk>

ext/DB_File/DB_File.pm
ext/DB_File/DB_File.xs

index ea77c32..fe9c34d 100644 (file)
@@ -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
index 821eaae..a13eaa6 100644 (file)
@@ -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