OpenVAS/Error.pm

filter: Statementstmt 61.1% 11 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 51.8% 14 / 27 CC 1 SCAR 4.1
CC
1
Cov
61%
new
2.0
message
2.0
code
2.0
CRAP 1.5
« OpenVAS/OMP/Response.pm ↑ Summary OpenVAS/OMP/Request.pm »
1 package Net::OpenVAS::Error;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use overload q|""| => 'message', fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '0.200';
9  
10 #-------------------------------------------------------------------------------
11 # CONSTRUCTOR
12 #-------------------------------------------------------------------------------
13  
14 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
15  
16 0 my ( $class, $message, $code ) = @_;
17  
18 0 my $self = { message => $message, code => $code, caller => [ caller(1) ] };
19  
20 0 return bless $self, $class;
21  
22 }
23  
24 #-------------------------------------------------------------------------------
25  
26 0 ▶sub message {
Subroutine message: not called CC=1 SCAR=6.9
Pod undocumented
27 0 my ($self) = @_;
28 0 return $self->{'message'};
29 }
30  
31 #-------------------------------------------------------------------------------
32  
33 0 ▶sub code {
Subroutine code: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my ($self) = @_;
35 0 return $self->{'code'};
36 }
37  
38 #-------------------------------------------------------------------------------
39  
40 2 1;
41  
42 __END__
« OpenVAS/OMP/Response.pm ↑ Summary OpenVAS/OMP/Request.pm »