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
|
|
650
|
use Modern::Perl; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
597
|
use Moose::Role; |
|
1
|
|
|
|
|
5376
|
|
|
1
|
|
|
|
|
7
|
|
7
|
1
|
|
|
1
|
|
6131
|
use Method::Signatures; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
8
|
|
8
|
1
|
|
|
1
|
|
352
|
use Data::Printer alias => 'pdump'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
0
|
0
|
1
|
|
112562
|
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; |