| 1 | package MySQL::Util::Lite::Roles::NewColumn; | ||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||
| 3 | 1 | our $VERSION = '0.01'; | |||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use Modern::Perl; | ||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Moose::Role; | ||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use Method::Signatures; | ||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Data::Printer alias => 'pdump'; | ||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||
| 10 | 0 | ▶ | method new_column (HashRef $column_descript) { | ||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.1
Subroutine
new_column: not called CC=7 SCAR=37.8
Branch: 3 branches
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef")
$Method::Signatures::mutc{"cache"}{"HashRef"}
"Method::Signatures"->_make_constraint("HashRef")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"HashRef"}B= "Method::Signatures"->_make_constraint("HashRef")
| |||||||||||||||||||||||||||||||||||||
| 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 | ▶ | is_autoinc => $col->{EXTRA} =~ /auto_increment/i ? 1 : 0, | ||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||
| 21 | ); | ||||||||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||
| 24 | 1 | 1; | |||||||||||||||||||||||||||||||||||