EntityModel/Query/InsertField.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 84.3% 27 / 32 CC 4 SCAR 11.6
CC
4
Cov
82%
new
4.3
BEGIN
1.0
BEGIN
1.0
CRAP 3.2
« EntityModel/Field.pm ↑ Summary EntityModel/Query/UpdateField.pm »
1 package EntityModel::Query::InsertField;
2 {
3 34 $EntityModel::Query::InsertField::VERSION = '0.102';
4 }
5 34 ▶use EntityModel::Class {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 34 '_isa' => [qw(EntityModel::Query::Field)],
7 'value' => 'string',
8 34 };
9 34 ▶no if $] >= 5.017011, warnings => "experimental::smartmatch";
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 EntityModel::Query::InsertField - field list for INSERT statement
14  
15 =head1 VERSION
16  
17 version 0.102
18  
19 =head1 SYNOPSIS
20  
21 See L<Entitymodel::Query>.
22  
23 =head1 DESCRIPTION
24  
25 See L<Entitymodel::Query>.
26  
27 =cut
28  
29 =head1 METHODS
30  
31 =cut
32  
33 4 ▶sub new {
Subroutine new: called CC=4 SCAR=14.6
Pod documented
34 4 my $class = shift;
35 4 my $self = bless { }, $class;
36 4 my $args = shift;
37 4 my @spec;
38 4 ▶ if(ref $args ~~ 'HASH') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $args ~~ 'HASH') { } 4 0 4
elsif (ref $args ~~ 'ARRAY') { } 0 0 0
39 4 push @spec, %$args;
40 } elsif(ref $args ~~ 'ARRAY') {
41 0 push @spec, @$args;
42 } else {
43 0 die "no idea what $args is";
44 }
45  
46 4 ▶ while(@spec) {
Branch: 1 branch
BranchTrueFalseTotal
if (@spec) 8 4 12
47 8 my $k = shift(@spec);
48 8 my $v = shift(@spec);
49 8 $self->$k($v);
50 }
51 4 return $self;
52 }
53  
54 34 1;
55  
56 __END__
« EntityModel/Field.pm ↑ Summary EntityModel/Query/UpdateField.pm »