| 1 | package SBOM::CycloneDX::Declarations::Confidence; | ||||||||||
| 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 SBOM::CycloneDX::List; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use Types::Standard qw(Str Num); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 1 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 1 | extends 'SBOM::CycloneDX::Base'; | |||||||||
| 16 | |||||||||||
| 17 | 1 | has score => (is => 'rw', isa => Num); | |||||||||
| 18 | 1 | has rationale => (is => 'rw', isa => Str); | |||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub TO_JSON { | ||||||||
|
Subroutine
TO_JSON: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 21 | |||||||||||
| 22 | 0 | my $self = shift; | |||||||||
| 23 | |||||||||||
| 24 | 0 | my $json = {}; | |||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | $json->{score} = $self->score if $self->score; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 0 | ▶ | $json->{rationale} = $self->rationale if $self->rationale; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | |||||||||||
| 29 | 0 | return $json; | |||||||||
| 30 | |||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||
| 34 | |||||||||||
| 35 | =encoding utf-8 | ||||||||||
| 36 | |||||||||||
| 37 | =head1 NAME | ||||||||||
| 38 | |||||||||||
| 39 | SBOM::CycloneDX::Declarations::Confidence - Confidence | ||||||||||
| 40 | |||||||||||
| 41 | =head1 SYNOPSIS | ||||||||||
| 42 | |||||||||||
| 43 | SBOM::CycloneDX::Declarations::Confidence->new(); | ||||||||||
| 44 | |||||||||||
| 45 | |||||||||||
| 46 | =head1 DESCRIPTION | ||||||||||
| 47 | |||||||||||
| 48 | L<SBOM::CycloneDX::Declarations::Confidence> provide the confidence of the claim | ||||||||||
| 49 | meeting the requirement. | ||||||||||
| 50 | |||||||||||
| 51 | =head2 METHODS | ||||||||||
| 52 | |||||||||||
| 53 | L<SBOM::CycloneDX::Declarations::Confidence> inherits all methods from L<SBOM::CycloneDX::Base> | ||||||||||
| 54 | and implements the following new ones. | ||||||||||
| 55 | |||||||||||
| 56 | =over | ||||||||||
| 57 | |||||||||||
| 58 | =item SBOM::CycloneDX::Declarations::Confidence->new( %PARAMS ) | ||||||||||
| 59 | |||||||||||
| 60 | Properties: | ||||||||||
| 61 | |||||||||||
| 62 | =over | ||||||||||
| 63 | |||||||||||
| 64 | =item * C<rationale>, The rationale for the confidence score. | ||||||||||
| 65 | |||||||||||
| 66 | =item * C<score>, The confidence of the claim between and inclusive of 0 and | ||||||||||
| 67 | 1, where 1 is 100% confidence. | ||||||||||
| 68 | |||||||||||
| 69 | =back | ||||||||||
| 70 | |||||||||||
| 71 | =item $confidence->rationale | ||||||||||
| 72 | |||||||||||
| 73 | =item $confidence->score | ||||||||||
| 74 | |||||||||||
| 75 | =back | ||||||||||
| 76 | |||||||||||
| 77 | |||||||||||
| 78 | =head1 SUPPORT | ||||||||||
| 79 | |||||||||||
| 80 | =head2 Bugs / Feature Requests | ||||||||||
| 81 | |||||||||||
| 82 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 83 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||||||||||
| 84 | You will be notified automatically of any progress on your issue. | ||||||||||
| 85 | |||||||||||
| 86 | =head2 Source Code | ||||||||||
| 87 | |||||||||||
| 88 | This is open source software. The code repository is available for | ||||||||||
| 89 | public review and contribution under the terms of the license. | ||||||||||
| 90 | |||||||||||
| 91 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||||||||||
| 92 | |||||||||||
| 93 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||||||||||
| 94 | |||||||||||
| 95 | |||||||||||
| 96 | =head1 AUTHOR | ||||||||||
| 97 | |||||||||||
| 98 | =over 4 | ||||||||||
| 99 | |||||||||||
| 100 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||||||||||
| 101 | |||||||||||
| 102 | =back | ||||||||||
| 103 | |||||||||||
| 104 | |||||||||||
| 105 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 106 | |||||||||||
| 107 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||||||||||
| 108 | |||||||||||
| 109 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 110 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 111 | |||||||||||
| 112 | =cut | ||||||||||