line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MySQL::Util::Lite::Roles::NewColumn; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
608
|
use Modern::Perl; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
581
|
use Moose::Role; |
|
1
|
|
|
|
|
5141
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
5614
|
use Method::Signatures; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
8
|
1
|
|
|
1
|
|
348
|
use Data::Printer alias => 'pdump'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
0
|
0
|
1
|
|
123972
|
method new_column (HashRef $column_descript) { |
|
0
|
0
|
|
0
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my $col = $column_descript; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
return MySQL::Util::Lite::Column->new( |
15
|
|
|
|
|
|
|
name => $col->{FIELD}, |
16
|
|
|
|
|
|
|
key => $col->{KEY}, |
17
|
|
|
|
|
|
|
default => $col->{DEFAULT}, |
18
|
|
|
|
|
|
|
type => $col->{TYPE}, |
19
|
|
|
|
|
|
|
is_null => $col->{NULL} =~ /^yes$/i ? 1 : 0, |
20
|
0
|
0
|
|
|
|
|
is_autoinc => $col->{EXTRA} =~ /auto_increment/i ? 1 : 0, |
|
|
0
|
|
|
|
|
|
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |