line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Database::Driver::DBM; |
2
|
|
|
|
|
|
|
$Test::Database::Driver::DBM::VERSION = '1.113'; |
3
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
156
|
|
4
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
116
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
19
|
use File::Spec; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
81
|
|
7
|
4
|
|
|
4
|
|
19
|
use File::Path; |
|
4
|
|
|
|
|
74
|
|
|
4
|
|
|
|
|
261
|
|
8
|
4
|
|
|
4
|
|
4224
|
use DBD::DBM; |
|
4
|
|
|
|
|
1237049
|
|
|
4
|
|
|
|
|
140
|
|
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
49
|
use Test::Database::Driver; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
874
|
|
11
|
|
|
|
|
|
|
our @ISA = qw( Test::Database::Driver ); |
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
1
|
58
|
sub is_filebased {1} |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
74
|
sub _version { return DBD::DBM->VERSION; } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub dsn { |
18
|
0
|
|
|
0
|
1
|
|
my ( $self, $dbname ) = @_; |
19
|
0
|
|
|
|
|
|
my $dbdir = File::Spec->catdir( $self->base_dir(), $dbname ); |
20
|
0
|
|
|
|
|
|
mkpath( [$dbdir] ); |
21
|
0
|
|
|
|
|
|
return $self->make_dsn( f_dir => $dbdir ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub drop_database { |
25
|
0
|
|
|
0
|
1
|
|
my ( $self, $dbname ) = @_; |
26
|
0
|
|
|
|
|
|
my $dbdir = File::Spec->catdir( $self->base_dir(), $dbname ); |
27
|
0
|
|
|
|
|
|
rmtree( [$dbdir] ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
'DBM'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |