line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Aniki::Schema::Table::PrimaryKey; |
2
|
29
|
|
|
29
|
|
551
|
use 5.014002; |
|
29
|
|
|
|
|
102
|
|
3
|
|
|
|
|
|
|
|
4
|
29
|
|
|
29
|
|
167
|
use namespace::autoclean; |
|
29
|
|
|
|
|
67
|
|
|
29
|
|
|
|
|
197
|
|
5
|
29
|
|
|
29
|
|
2345
|
use Mouse v2.4.5; |
|
29
|
|
|
|
|
450
|
|
|
29
|
|
|
|
|
206
|
|
6
|
29
|
|
|
29
|
|
11049
|
use Aniki::Schema::Table::Field; |
|
29
|
|
|
|
|
67
|
|
|
29
|
|
|
|
|
771
|
|
7
|
29
|
|
|
29
|
|
156
|
use Carp qw/croak/; |
|
29
|
|
|
|
|
66
|
|
|
29
|
|
|
|
|
9250
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has _primary_key => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
required => 1, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has _fields => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
default => sub { |
17
|
|
|
|
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
return [ |
19
|
|
|
|
|
|
|
map { Aniki::Schema::Table::Field->new($_) } $self->_primary_key->fields |
20
|
|
|
|
|
|
|
]; |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub BUILDARGS { |
25
|
89
|
|
|
89
|
1
|
1856
|
my ($class, $primary_key) = @_; |
26
|
89
|
|
|
|
|
1008
|
return $class->SUPER::BUILDARGS(_primary_key => $primary_key); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
30
|
|
|
30
|
0
|
70
|
sub fields { @{ shift->_fields } } |
|
30
|
|
|
|
|
176
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our $AUTOLOAD; |
32
|
|
|
|
|
|
|
sub AUTOLOAD { |
33
|
0
|
|
|
0
|
|
|
my $self = shift; |
34
|
0
|
|
|
|
|
|
my $method = $AUTOLOAD =~ s/^.*://r; |
35
|
0
|
0
|
|
|
|
|
if ($self->_primary_key->can($method)) { |
36
|
0
|
|
|
|
|
|
return $self->_primary_key->$method(@_); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $class = ref $self; |
40
|
0
|
|
|
|
|
|
croak qq{Can't locate object method "$method" via package "$class"}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
44
|
|
|
|
|
|
|
__END__ |