line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package SQL::Admin; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1351
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = v0.5.0; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
71541
|
use Module::Load qw(); |
|
1
|
|
|
|
|
4136
|
|
|
1
|
|
|
|
|
42
|
|
12
|
1
|
|
|
1
|
|
13
|
use SQL::Admin::Utils qw( refarray ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
890
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
###################################################################### |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our %CATALOG_MAP; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
###################################################################### |
19
|
|
|
|
|
|
|
###################################################################### |
20
|
|
|
|
|
|
|
sub new { # ; |
21
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
22
|
0
|
0
|
|
|
|
|
$class = ref $class if ref $class; |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
bless { |
25
|
|
|
|
|
|
|
-sql_admin_search => [ $class, $class ne __PACKAGE__ ? __PACKAGE__ : () ], |
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
###################################################################### |
31
|
|
|
|
|
|
|
###################################################################### |
32
|
|
|
|
|
|
|
sub _load_and_new { # ; |
33
|
0
|
|
|
0
|
|
|
my ($self, $class, @args) = @_; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
Module::Load::load ($class); |
36
|
0
|
|
|
|
|
|
$class->new (@args); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
###################################################################### |
41
|
|
|
|
|
|
|
###################################################################### |
42
|
|
|
|
|
|
|
sub get_driver { # ; |
43
|
0
|
|
|
0
|
0
|
|
my ($self, $name, @args) = @_; |
44
|
0
|
|
|
|
|
|
my $retval; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
$retval ||= eval { $self->_load_and_new ($_ . '::Driver::' . $name, @args) } |
|
0
|
|
|
|
|
|
|
47
|
0
|
|
0
|
|
|
|
for @{ $self->{-sql_admin_search} }; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
################################################################## |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
$retval; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
###################################################################### |
56
|
|
|
|
|
|
|
###################################################################### |
57
|
|
|
|
|
|
|
sub get_catalog { # ; |
58
|
0
|
|
|
0
|
0
|
|
my ($self, $name, @args) = @_; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
my $cat; |
61
|
0
|
0
|
0
|
|
|
|
$cat = $CATALOG_MAP{$name} |
62
|
|
|
|
|
|
|
if ( (defined $name) and ($CATALOG_MAP{$name})); |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
0
|
|
|
|
$cat ||= $self->_load_and_new ('SQL::Admin::Catalog', @args); |
65
|
|
|
|
|
|
|
|
66
|
0
|
0
|
|
|
|
|
$CATALOG_MAP{$name} = $cat if defined $name; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
################################################################## |
69
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
$cat; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
###################################################################### |
75
|
|
|
|
|
|
|
###################################################################### |
76
|
|
|
|
|
|
|
sub compare { # ; |
77
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
78
|
0
|
0
|
|
|
|
|
my $args = shift if @_ > 2; |
79
|
|
|
|
|
|
|
|
80
|
0
|
0
|
|
|
|
|
my ($src, $dst) = map refarray ($_) ? $self->get_catalog->load (@$_) : $_, @_; |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
$self |
83
|
|
|
|
|
|
|
->_load_and_new ('SQL::Admin::Catalog::Compare', %$args) |
84
|
|
|
|
|
|
|
->compare ($src, $dst) |
85
|
|
|
|
|
|
|
; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
###################################################################### |
90
|
|
|
|
|
|
|
###################################################################### |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
package SQL::Admin; |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
1; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
__END__ |