DB_File

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


   * merged core patch 17838

1.805 1st September 2002

   * Added support to allow DB_File to build with Berkeley DB 4.1.X

   * Tightened up the test harness to test that calls to untie don't generate
     the "untie attempted while %d inner references still exist" warning.

   * added code to guard against calling the callbacks (compare,hash & prefix)
     recursively.

   * passing undef for the flags and/or mode when opening a database could cause
     a "Use of uninitialized value in subroutine entry" warning. Now silenced.

   * DBM filter code beefed up to cope with read-only $_.

1.804 2nd June 2002

   * Perl core patch 14939 added a new warning to "splice". This broke the

Changes  view on Meta::CPAN

    Fixed a core dump problem with SunOS.

    The return value from TIEHASH wasn't set to NULL when dbopen
    returned an error.

1.0

    DB_File has been in use for over a year. To reflect that, the
    version number has been incremented to 1.0.

    Added complete support for multiple concurrent callbacks.

    Using the push method on an empty list didn't work properly. This
    has been fixed.

0.3

    Added prototype support for multiple btree compare callbacks.

0.2

    When DB_File is opening a database file it no longer terminates the
    process if dbopen returned an error. This allows file protection
    errors to be caught at run time. Thanks to Judith Grass
    <grass@cybercash.com> for spotting the bug.

0.1

DB_File.xs  view on Meta::CPAN

 All comments/suggestions/problems are welcome

     Copyright (c) 1995-2023 Paul Marquess. All rights reserved.
     This program is free software; you can redistribute it and/or
     modify it under the same terms as Perl itself.

 Changes:
    0.1 -   Initial Release
    0.2 -   No longer bombs out if dbopen returns an error.
    0.3 -   Added some support for multiple btree compares
    1.0 -   Complete support for multiple callbacks added.
            Fixed a problem with pushing a value onto an empty list.
    1.01 -  Fixed a SunOS core dump problem.
            The return value from TIEHASH wasn't set to NULL when
            dbopen returned an error.
    1.02 -  Use ALIAS to define TIEARRAY.
            Removed some redundant commented code.
            Merged OS2 code into the main distribution.
            Allow negative subscripts with RECNO interface.
            Changed the default flags to O_CREAT|O_RDWR
    1.03 -  Added EXISTS

DB_File.xs  view on Meta::CPAN

    1.78 -  Core patch 10335, 10372, 10534, 10549, 11051 included.
    1.79 -  NEXTKEY ignores the input key.
            Added lots of casts
    1.800 - Moved backward compatibility code into ppport.h.
            Use the new constants code.
    1.801 - No change to DB_File.xs
    1.802 - No change to DB_File.xs
    1.803 - FETCH, STORE & DELETE don't map the flags parameter
            into the equivalent Berkeley DB function anymore.
    1.804 - no change.
    1.805 - recursion detection added to the callbacks
            Support for 4.1.X added.
            Filter code can now cope with read-only $_
    1.806 - recursion detection beefed up.
    1.807 - no change
    1.808 - leak fixed in ParseOpenInfo
    1.809 - no change
    1.810 - no change
    1.811 - no change
    1.812 - no change
    1.813 - no change

t/db-btree.t  view on Meta::CPAN


my %wall = $YY->get_dup('Wall', 1) ;
ok(83, keys %wall == 3 && $wall{'Larry'} == 1 && $wall{'Stone'} == 1
                && $wall{'Brick'} == 2);

undef $YY ;
untie %hh ;
unlink $Dfile;


# test multiple callbacks
my $Dfile1 = "btree1" ;
my $Dfile2 = "btree2" ;
my $Dfile3 = "btree3" ;

my $dbh1 = DB_File::BTREEINFO->new();
$dbh1->{compare} = sub {
        no warnings 'numeric' ;
        $_[0] <=> $_[1] } ;

my $dbh2 = DB_File::BTREEINFO->new();

t/db-btree.t  view on Meta::CPAN

#    {
#        no warnings;
#        untie %hash;
#    }
#    unlink $Dfile;
#}
ok(164,1);
ok(165,1);

{
    # Check that two callbacks don't interact
    my %hash1 ;
    my %hash2 ;
    my $h1_count = 0;
    my $h2_count = 0;
    unlink $Dfile, $Dfile2;
    my $dbh1 = DB_File::BTREEINFO->new();
    $dbh1->{compare} = sub { ++ $h1_count ; $_[0] cmp $_[1] } ;

    my $dbh2 = DB_File::BTREEINFO->new();
    $dbh2->{compare} = sub { ;++ $h2_count ; $_[0] cmp $_[1] } ;



( run in 4.065 seconds using v1.01-cache-2.11-cpan-9b1e4054eb1 )