line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Schema::Data::Plugin; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
72401
|
use strict; |
|
2
|
|
|
|
|
23
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
20
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
71
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
957
|
use Class::Utils qw(set_params); |
|
2
|
|
|
|
|
26897
|
|
|
2
|
|
|
|
|
44
|
|
7
|
2
|
|
|
2
|
|
141
|
use Error::Pure qw(err); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
86
|
|
8
|
2
|
|
|
2
|
|
15
|
use Scalar::Util qw(blessed); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
661
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = 0.06; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
0
|
|
|
0
|
0
|
|
my ($class, @params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Create object. |
16
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Schema. |
19
|
0
|
|
|
|
|
|
$self->{'schema'} = undef; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Verbose callback. |
22
|
0
|
|
|
|
|
|
$self->{'verbose_cb'} = undef; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Process parameters. |
25
|
0
|
|
|
|
|
|
set_params($self, @params); |
26
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
if (! defined $self->{'schema'}) { |
28
|
0
|
|
|
|
|
|
err "Parameter 'schema' is required."; |
29
|
|
|
|
|
|
|
} |
30
|
0
|
0
|
0
|
|
|
|
if (! blessed($self->{'schema'}) || ! $self->{'schema'}->isa('DBIx::Class::Schema')) { |
31
|
0
|
|
|
|
|
|
err "Parameter 'schema' must be a instance of 'DBIx::Class::Schema'."; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
0
|
0
|
0
|
|
|
|
if (defined $self->{'verbose_cb'} && ref $self->{'verbose_cb'} ne 'CODE') { |
35
|
0
|
|
|
|
|
|
err "Parameter 'verbose_cb' must be reference to code."; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
return $self; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub load { |
42
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
err 'Package __PACKAGE__ is abstract class. load() method must be '. |
45
|
|
|
|
|
|
|
'defined in inherited class.'; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub supported_versions { |
49
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
err 'Package __PACKAGE__ is abstract class. supported_versions() method must be '. |
52
|
|
|
|
|
|
|
'defined in inherited class.'; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |