line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::SQL::DB; |
2
|
2
|
|
|
2
|
|
612865
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
68
|
|
3
|
2
|
|
|
2
|
|
92
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
56
|
|
4
|
2
|
|
|
2
|
|
10
|
use File::ShareDir qw/dist_dir/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
119
|
|
5
|
2
|
|
|
2
|
|
8
|
use Log::Any qw/$log/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
6
|
2
|
|
|
2
|
|
162
|
use Moo::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
23
|
|
7
|
2
|
|
|
2
|
|
606
|
use Path::Class; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
121
|
|
8
|
2
|
|
|
2
|
|
10
|
use SQL::DBx::Deploy; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
486
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.971.0'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _clean_database { |
13
|
3
|
|
|
3
|
|
7284
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# The lib ("prove -Ilib t/*") case: |
16
|
3
|
|
|
|
|
54
|
my $dir1 = |
17
|
|
|
|
|
|
|
file(__FILE__) |
18
|
|
|
|
|
|
|
->parent->parent->parent->parent->subdir( 'share', $self->dbd ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# The blib ("make test") case |
21
|
3
|
|
|
|
|
3730
|
my $dir2 = |
22
|
|
|
|
|
|
|
file(__FILE__) |
23
|
|
|
|
|
|
|
->parent->parent->parent->parent->parent->subdir( 'share', $self->dbd ); |
24
|
|
|
|
|
|
|
|
25
|
3
|
50
|
|
|
|
1433
|
if ( -d $dir1 ) { |
|
|
50
|
|
|
|
|
|
26
|
0
|
|
|
|
|
0
|
$self->run_dir( $dir1->subdir('clean') ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
elsif ( -d $dir2 ) { |
29
|
3
|
|
|
|
|
278
|
$self->run_dir( $dir2->subdir('clean') ); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
else { |
32
|
|
|
|
|
|
|
# The "installed" case |
33
|
0
|
|
|
|
|
|
my $distdir = dir( dist_dir('SQL-DB'), $self->dbd, 'clean' ); |
34
|
0
|
|
|
|
|
|
$self->run_dir($distdir); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Moo::Role->apply_role_to_package( 'SQL::DB', __PACKAGE__ ); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |