use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new(
- file => $filename,
- fh => $fh,
-);
+my $db = DBM::Deep->new( $filename );
##
# put/get key
##
undef $db;
open $fh, '+<', $filename;
-$db = DBM::Deep->new(
- file => $filename,
- fh => $fh,
-);
+$db = DBM::Deep->new( $filename );
is( $db->get("key1"), "value222222222222222222222222", "The value we set is still there after closure" );
##
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
type => DBM::Deep->TYPE_ARRAY
);
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
locking => 1,
);
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
type => DBM::Deep->TYPE_HASH,
);
open $fh, '+<', $filename;
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
type => DBM::Deep->TYPE_HASH,
);
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
type => DBM::Deep->TYPE_ARRAY,
);
open $fh, '+<', $filename;
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
type => DBM::Deep->TYPE_ARRAY,
);
use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+my $db = DBM::Deep->new( $filename );
##
# put/get simple keys
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
type => $type,
});
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
autobless => 1,
});
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
type => DBM::Deep->TYPE_ARRAY,
});
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
autobless => 1,
});
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
autobless => 1,
});
use_ok( 'DBM::Deep' );
my ($fh2, $filename2) = new_fh();
-my $db2 = DBM::Deep->new( file => $filename2, fh => $fh2, );
+my $db2 = DBM::Deep->new( $filename2 );
SKIP: {
skip "Apparently, we cannot detect a tied scalar?", 1;
{
my ($fh, $filename) = new_fh();
- my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+ my $db = DBM::Deep->new( $filename );
##
# Create structure in $db
use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+my $db = DBM::Deep->new( $filename );
##
# Create structure in $db
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
autobless => 1,
);
{
my $db = DBM::Deep->new(
file => $filename2,
- fh => $fh2,
autobless => 1,
);
my $obj = bless {
my ($fh3, $filename3) = new_fh();
my $db = DBM::Deep->new(
file => $filename3,
- fh => $fh3,
autobless => 1,
);
use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+my $db = DBM::Deep->new( $filename );
my %hash = (
foo => 1,
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
data_sector_size => 32,
);
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
data_sector_size => 64,
);
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
data_sector_size => 128,
);
{
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
data_sector_size => 256,
);
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
autoflush => 1,
});
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new({
file => $filename,
- fh => $fh,
autoflush => 1,
});
my ($fh, $filename) = new_fh();
my $db1 = DBM::Deep->new(
file => $filename,
- fh => $fh,
locking => 1,
autoflush => 1,
num_txns => 2,
my $db2 = DBM::Deep->new(
file => $filename,
- fh => $fh,
locking => 1,
autoflush => 1,
num_txns => 2,
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
locking => 1,
autoflush => 1,
num_txns => 16,
my $db2 = DBM::Deep->new(
file => $filename,
- fh => $fh,
locking => 1,
autoflush => 1,
num_txns => 16,
my ($fh, $filename) = new_fh();
my $db = DBM::Deep->new(
file => $filename,
- fh => $fh,
);
my $bar = bless { foo => 'ope' }, 'Foo';
# This is bug #29957, reported by HANENKAMP
{
my ($fh, $filename) = new_fh();
- my $db = DBM::Deep->new(
- file => $filename,
- fh => $fh,
- );
+ my $db = DBM::Deep->new( $filename );
$db->{foo} = [];
# This is bug #33863, reported by PJS
{
my ($fh, $filename) = new_fh();
- my $db = DBM::Deep->new(
- file => $filename,
- fh => $fh,
- );
+ my $db = DBM::Deep->new( $filename );
$db->{foo} = [ 42 ];
my $foo = shift @{ $db->{foo} };
{
my ($fh, $filename) = t::common::new_fh();
- my $db = DBM::Deep->new(
- file => $filename,
- fh => $fh,
- );
+ my $db = DBM::Deep->new( $filename );
# Add a self-referencing connection to test export
my %struct = (
use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+my $db = DBM::Deep->new( $filename );
my $x = 1;
while( $x <= $max ) {
use t::common qw( new_fh );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh, );
+my $db = DBM::Deep->new( $filename );
my $todo = 1000;
my $allow = $todo*0.02; # NOTE: a 2% fail rate is hardly a failure
use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new( file => $filename, fh => $fh );
+my $db = DBM::Deep->new( $filename );
eval { $db->{randkey()} = randkey() for 1 .. 10; }; ok(!$@, "No eval failures");
use_ok( 'DBM::Deep' );
my ($fh, $filename) = new_fh();
-my $db = DBM::Deep->new(
- file => $filename,
-);
+my $db = DBM::Deep->new( $filename );
is( $db->_dump_file, <<"__END_DUMP__", "Dump of initial file correct" );
NumTxns: 1