Skip Menu |

This queue is for tickets about the LMDB_File CPAN distribution.

Report information
The Basics
Id: 98681
Status: resolved
Priority: 0/
Queue: LMDB_File

People
Owner: sog [...] msg.com.mx
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.05
Fixed in: 0.06



Subject: documented syntax OpenDB($hash) does nothing

In attached code, you will see that both blobs of code are in fact accessing the same database.

 

It appears when OpenDB($hash) is called, it does nothing with that value:

 

https://metacpan.org/source/SORTIZ/LMDB_File-0.05/lib/LMDB_File.pm#L232

 

Note how "$name" is not used anywhere when it *is* a hash? :P

Subject: lmdb.pl
#!/usr/bin/env perl # FILENAME: lmdb.pl # CREATED: 09/07/14 15:02:41 by Kent Fredric (kentnl) <kentfredric@gmail.com> # ABSTRACT: Make sure I get this. use strict; use warnings; use utf8; use LMDB_File qw( :dbflags :cursor_op ); mkdir '/tmp/some_path'; { my $env = LMDB::Env->new('/tmp/some_path', { maxdbs => 1024 } ); my $txn = $env->BeginTxn; $txn->AutoCommit(1); my $db = $txn->OpenDB( { dbname => "FIRST NAMESPACE", flags => MDB_CREATE, } ); eval { $db->del( "test1", undef ); }; $db->put("test1","Hello World"); } { my $env = LMDB::Env->new('/tmp/some_path', { maxdbs => 1024 }); my $txn = $env->BeginTxn; $txn->AutoCommit(1); my $db = $txn->OpenDB( { dbname => "SECOND NAMESPACE", flags => MDB_CREATE, } ); printf "%s\n", $db->get("test1"); }
El Dom Sep 07 04:33:00 2014, KENTNL escribió: Show quoted text
> In attached code, you will see that both blobs of code are in fact accessing > the same database. > > It appears when OpenDB($hash) is called, it does nothing with that value: > > https://metacpan.org/source/SORTIZ/LMDB_File-0.05/lib/LMDB_File.pm#L232 > > Note how "$name" is not used anywhere when it *is* a hash? :P
Fixed in 0.06, to be released in a few days. Thanks for the report.