EntityModel/Query/UpdateField.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/Query/InsertField.pm ↑ Summary EntityModel/StorageClass/KVStore/Layer/Fake.pm »
1 package EntityModel::Query::UpdateField;
2 {
3 34 $EntityModel::Query::UpdateField::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::UpdateField - field to be updated in an update 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 2 ▶sub new {
Subroutine new: called CC=4 SCAR=14.6
Pod documented
34 2 my $class = shift;
35 2 my $self = bless { }, $class;
36 2 my $args = shift;
37 2 my @spec;
38 2 ▶ if(ref $args ~~ 'HASH') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $args ~~ 'HASH') { } 2 0 2
elsif (ref $args ~~ 'ARRAY') { } 0 0 0
39 2 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 2 ▶ while(@spec) {
Branch: 1 branch
BranchTrueFalseTotal
if (@spec) 4 2 6
47 4 my $k = shift(@spec);
48 4 my $v = shift(@spec);
49 4 $self->$k($v);
50 }
51 2 return $self;
52 }
53  
54 34 1;
55  
56 __END__
« EntityModel/Query/InsertField.pm ↑ Summary EntityModel/StorageClass/KVStore/Layer/Fake.pm »