| 1 | package ICANN::RST::Error; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: an object representing an RST error. | ||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use base qw(ICANN::RST::Base); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 0 | ▶ | sub severity { $_[0]->{'Severity'} } | ||||||||||||||||||||||||||
|
Subroutine
severity: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 7 | 0 | ▶ | sub description { ICANN::RST::Text->new($_[0]->{'Description'}) } | ||||||||||||||||||||||||||
|
Subroutine
description: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | sub cases { | ||||||||||||||||||||||||||||
| 10 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
cases: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 0 | my %cases; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | foreach my $case ($self->spec->cases) { | |||||||||||||||||||||||||||
| 15 | 0 | foreach my $error ($case->errors) { | |||||||||||||||||||||||||||
| 16 | 0 | ▶ | $cases{$case->id} = $case if ($error->id eq $self->id && !defined($cases{$case->id})); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$error->id eq $self->id and not defined $cases{$case->id}
MC/DC0%0/2
$error->id eq $self->id and not defined $cases{$case->id}
$error->id eq $self->id
not defined $cases{$case->id}
Truth table0%0/3
A and not(B)
A= $error->id eq $self->idB= not defined $cases{$case->id}
| |||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | return sort { $a->id cmp $b->id } values(%cases); | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 1 | 1; | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | __END__ | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =pod | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | =encoding UTF-8 | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | =head1 NAME | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | ICANN::RST::Error - an object representing an RST error. | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | =head1 VERSION | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | version 0.03 | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | This class inherits from L<ICANN::RST::Base> (so it has the C<id()> and | ||||||||||||||||||||||||||||
| 42 | C<spec()> methods). | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | =head1 METHODS | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | =head2 description() | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | A L<ICANN::RST::Text> object containing the long textual description of the | ||||||||||||||||||||||||||||
| 49 | error. | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | =head2 severity() | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | A string containing one of C<WARNING>, C<ERROR> or C<CRITICAL>. | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | =head2 cases() | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | A list of all C<ICANN::RST::Case> objects that produce this error. | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | Gavin Brown <gavin.brown@icann.org> | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | This software is copyright (c) 2025 by Internet Corporation for Assigned Names and Number (ICANN). | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 68 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | =cut | ||||||||||||||||||||||||||||