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
|
|
677
|
use Modern::Perl; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
6
|
1
|
|
|
1
|
|
528
|
use Moose::Role; |
|
1
|
|
|
|
|
4328
|
|
|
1
|
|
|
|
|
25
|
|
7
|
1
|
|
|
1
|
|
4544
|
use Method::Signatures; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
8
|
1
|
|
|
1
|
|
338
|
use Data::Printer alias => 'pdump'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
0
|
0
|
1
|
|
88365
|
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; |