| Test-Database documentation | Contained in the Test-Database distribution. |
Test::Database::Driver::DBM - A Test::Database driver for DBM
use Test::Database;
my @handles = Test::Database->handles( 'DBM' );
This module is the Test::Database driver for DBD::DBM.
Philippe Bruhat (BooK), <book@cpan.org>
Copyright 2008-2010 Philippe Bruhat (BooK), all rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Test-Database documentation | Contained in the Test-Database distribution. |
package Test::Database::Driver::DBM; use strict; use warnings; use File::Spec; use File::Path; use DBD::DBM; use Test::Database::Driver; our @ISA = qw( Test::Database::Driver ); sub is_filebased {1} sub _version { return DBD::DBM->VERSION; } sub dsn { my ( $self, $dbname ) = @_; my $dbdir = File::Spec->catdir( $self->base_dir(), $dbname ); mkpath( [$dbdir] ); return $self->make_dsn( f_dir => $dbdir ); } sub drop_database { my ( $self, $dbname ) = @_; my $dbdir = File::Spec->catdir( $self->base_dir(), $dbname ); rmtree( [$dbdir] ); } 'DBM'; __END__