SRS/DS.pm

filter: Statementstmt 76.1% 16 / 21 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 12 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 40.8% 20 / 49 CC 7 SCAR 35.8
CC
7
Cov
43%
is_equal
56.0
BEGIN
1.0
BEGIN
1.0
CRAP 36.0
« SRS/Error.pm ↑ Summary SRS/Result.pm »
1 package XML::SRS::DS;
2 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 $XML::SRS::DS::VERSION = '0.09';
4 }
5  
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use PRANG::Graph;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use XML::SRS::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 has_attr 'key_tag' =>
11 is => "ro",
12 isa => "Int",
13 xml_name => "KeyTag",
14 ;
15  
16 1 has_attr 'algorithm' =>
17 is => "ro",
18 isa => "Int",
19 xml_name => "Algorithm",
20 ;
21  
22 1 has_attr 'digest_type' =>
23 is => "ro",
24 isa => "Int",
25 xml_name => "DigestType",
26 ;
27
28 1 has_element 'digest' =>
29 is => "rw",
30 isa => "Str",
31 xml_nodeName => "Digest",
32 ;
33  
34 1 with 'XML::SRS::Node';
35  
36 # Compare against another DS object, and
37 # return true if we decide it's equal
38 0 ▶sub is_equal {
Subroutine is_equal: not called CC=7 SCAR=40.3
Pod undocumented
39 0 my $self = shift;
40 0 my $other = shift;
41
42 0 ▶ confess "Can only compare against another XML::SRS::DS"
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($other) and $other->isa("XML::SRS::DS") 0 0 0
Condition0%0/3
builtin::blessed($other) and $other->isa("XML::SRS::DS")
!ll&&!rl&&r
000
MC/DC0%0/2
builtin::blessed($other) and $other->isa("XML::SRS::DS")
builtin::blessed($other) $other->isa("XML::SRS::DS")
Truth table0%0/3
A and B
A= builtin::blessed($other)B= $other->isa("XML::SRS::DS")
ABresult
0X0
100
111
43 unless blessed $other && $other->isa('XML::SRS::DS');
44
45 0 ▶ return 1 if $self->key_tag eq $other->key_tag &&
Branch: 1 branch
BranchTrueFalseTotal
if $self->key_tag eq $other->key_tag and $self->algorithm eq $other->algorithm and $self->digest_type eq $other->digest_type and $self->digest eq $other->digest 0 0 0
Condition0%0/9
$self->key_tag eq $other->key_tag and $self->algorithm eq $other->algorithm and $self->digest_type eq $other->digest_type and $self->digest eq $other->digest
!ll&&!rl&&r
000
$self->key_tag eq $other->key_tag and $self->algorithm eq $other->algorithm and $self->digest_type eq $other->digest_type
!ll&&!rl&&r
000
$self->key_tag eq $other->key_tag and $self->algorithm eq $other->algorithm
!ll&&!rl&&r
000
MC/DC0%0/4
$self->key_tag eq $other->key_tag and $self->algorithm eq $other->algorithm and $self->digest_type eq $other->digest_type and $self->digest eq $other->digest
$self->key_tag eq $other->key_tag $self->algorithm eq $other->algorithm $self->digest_type eq $other->digest_type $self->digest eq $other->digest
Truth table0%0/5
A and B and C and D
A= $self->key_tag eq $other->key_tagB= $self->algorithm eq $other->algorithmC= $self->digest_type eq $other->digest_typeD= $self->digest eq $other->digest
ABCDresult
0XXX0
10XX0
110X0
11100
11111
46 $self->algorithm eq $other->algorithm &&
47 $self->digest_type eq $other->digest_type &&
48 $self->digest eq $other->digest;
49
50 0 return 0;
51 }
52  
53 1 1;
« SRS/Error.pm ↑ Summary SRS/Result.pm »