WuFoo/Entry.pm

filter: Statementstmt 56.0% 14 / 25 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 33.3% 1 / 3 Podpod 0.0% 0 / 2 totaltotal 36.5% 15 / 41 CC 6 SCAR 34.6
CC
6
Cov
42%
val_hash
42.0
data
2.0
BEGIN
1.0
CRAP 31.9
↑ Summary WuFoo/Form.pm »
1 package WWW::WuFoo::Entry;
2 {
3 1 $WWW::WuFoo::Entry::VERSION = '0.007';
4 }
5  
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # ABSTRACT: The Entries API is used to gather the data that users have submitted to your form. In this section we’ll describe the hierarchy of the entries element as well as describe the syntax for filtering this data.
9  
10 1 has '_wufoo' => (is => 'rw', isa => 'WWW::WuFoo');
11 1 has '_form' => (is => 'rw', isa => 'WWW::WuFoo::Form');
12 1 has '_original' => (is => 'rw', isa => 'HashRef');
13 1 has 'entryid' => (is => 'rw', isa => 'Int');
14 1 has 'datecreated' => (is => 'rw', isa => 'Str');
15 1 has 'createdby' => (is => 'rw', isa => 'Str');
16 1 has 'dateupdated' => (is => 'rw', isa => 'Str');
17 1 has 'updatedby' => (is => 'rw', isa => 'Str');
18  
19  
20  
21 0 ▶sub data {
Subroutine data: not called CC=1 SCAR=6.9
Pod undocumented
22 0 my ($self) = @_;
23 0 return $self->_original;
24 }
25  
26 0 ▶sub val_hash {
Subroutine val_hash: not called CC=6 SCAR=37.4
Pod undocumented
27 0 my ($self) = @_;
28  
29 0 my $hash;
30 0 my $fields = $self->_form->fields;
31 0 foreach my $f (@$fields) {
32 0 ▶ if (my $subs = $f->subfields) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $subs = $f->subfields) { } 0 0 0
33 0 foreach my $subfield (@$subs) {
34 0 $hash->{$subfield->{Label}} = $self->_original->{$subfield->{ID}};
35 }
36 }
37  
38 else {
39 0 ▶ $hash->{$f->title || $f->label || $f->id} = $self->_original->{$f->id};
Condition0%0/6
$f->title || $f->label || $f->id
l!l&&r!l&&!r
000
$f->title or $f->label
l!l&&r!l&&!r
000
MC/DC0%0/3
$f->title || $f->label || $f->id
$f->title $f->label $f->id
Truth table0%0/4
A or B || C
A= $f->titleB= $f->labelC= $f->id
ABCresult
1XX1
01X1
0011
0000
40 }
41 }
42  
43 0 return $hash;
44 }
45  
46  
47 1 1;
↑ Summary WuFoo/Form.pm »