lib/MySQL/Util/Lite/Roles/NewColumn.pm

filter: Statementstmt 69.5% 16 / 23 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 47.7% 21 / 44 CC 7 SCAR 32.6
CC
7
Cov
44%
new_column
43.8
BEGIN
1.7
BEGIN
1.0
CRAP 26.0
« lib/MySQL/Util/Lite/Table.pm ↑ Summary lib/MySQL/Util/Lite.pm »
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
BranchTrueFalseTotal
unless scalar @_ > 0 0 0 0
unless ($Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef"))->check($column_descript) 0 0 0
if scalar @_ > 1 0 0 0
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef")
l!l&&r!l&&!r
000
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")
ABresult
1X1
011
000
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
BranchTrueFalseTotal
$col->{'NULL'} =~ /^yes$/iu ? : 0 0 0
$col->{'EXTRA'} =~ /auto_increment/iu ? : 0 0 0
21 );
22 }
23  
24 1 1;
« lib/MySQL/Util/Lite/Table.pm ↑ Summary lib/MySQL/Util/Lite.pm »