| 1 | package CSAF::Type::Acknowledgment; | ||||||||||
| 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 Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | extends 'CSAF::Type::Base'; | |||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | has names => (is => 'rw', isa => \&_check_isa_array, default => sub { [] }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 2 | ▶ | has urls => (is => 'rw', isa => \&_check_isa_array, default => sub { [] }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 1 | has summary => (is => 'rw'); | |||||||||
| 14 | 1 | has organization => (is => 'rw'); | |||||||||
| 15 | |||||||||||
| 16 | 4 | ▶ | sub _check_isa_array { | ||||||||
|
Subroutine
_check_isa_array: called CC=2 SCAR=7.6
| |||||||||||
| 17 | 4 | ▶ | Carp::croak 'must be an array' if (ref $_[0] ne 'ARRAY'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub TO_CSAF { | ||||||||
|
Subroutine
TO_CSAF: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||
| 21 | |||||||||||
| 22 | 0 | my $self = shift; | |||||||||
| 23 | |||||||||||
| 24 | 0 | my $output = {}; | |||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | $output->{summary} = $self->summary if ($self->summary); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 0 | ▶ | $output->{organization} = $self->organization if ($self->organization); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | $output->{names} = $self->names if (@{$self->names}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | ▶ | $output->{urls} = $self->urls if (@{$self->urls}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | |||||||||||
| 32 | 0 | return $output; | |||||||||
| 33 | |||||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 1 | 1; | |||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||