CSAF/Type/Relationship.pm

filter: Statementstmt 85.1% 23 / 27 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 78.9% 30 / 38 CC 2 SCAR 8.0
CC
2
Cov
79%
__ANON__
6.0
TO_CSAF
2.0
BEGIN
1.0
CRAP 2.2
« CSAF/Type/Hash.pm ↑ Summary CSAF/Type/FullProductName.pm »
1 package CSAF::Type::Relationship;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use CSAF::Type::FullProductName;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 extends 'CSAF::Type::Base';
12  
13 1 has category => (is => 'rw', required => 1);
14 1 has product_reference => (is => 'rw', required => 1);
15 1 has relates_to_product_reference => (is => 'rw', required => 1);
16  
17 has full_product_name => (
18 is => 'rw',
19 0 ▶ coerce => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
20 0 ▶ (ref($_[0]) !~ /FullProductName/) ? CSAF::Type::FullProductName->new(shift) : $_[0];
Branch: 1 branch
BranchTrueFalseTotal
!(ref($_[0]) =~ /FullProductName/) ? : 0 0 0
21 }
22 1 );
23  
24 0 ▶sub TO_CSAF {
Subroutine TO_CSAF: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 my $self = shift;
27  
28 0 my $output = {
29 category => $self->category,
30 full_product_name => $self->full_product_name,
31 product_reference => $self->product_reference,
32 relates_to_product_reference => $self->relates_to_product_reference,
33 };
34  
35 0 return $output;
36  
37 }
38  
39  
40 1 1;
41  
42 __END__
« CSAF/Type/Hash.pm ↑ Summary CSAF/Type/FullProductName.pm »