OpenVAS/OMP/Request.pm

filter: Statementstmt 88.5% 31 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 4 / 4 totaltotal 87.7% 43 / 49 CC 1 SCAR 1.8
CC
1
Cov
89%
raw
2.0
arguments
2.0
BEGIN
1.0
CRAP 1.2
« OpenVAS/Error.pm ↑ Summary OpenVAS.pm »
1 package Net::OpenVAS::OMP::Request;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use feature ':5.10';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use XML::Hash::XS;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use overload q|""| => 'raw', fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 our $VERSION = '0.200';
13  
14 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
15  
16 1 my ( $class, %args ) = @_;
17  
18 1 my $command = $args{'command'};
19 1 my $arguments = $args{'arguments'};
20  
21 1 my $request = { $command => $arguments };
22 1 my $raw = hash2xml( \%{$arguments}, root => $command, use_attr => 1, xml_decl => 0 );
23  
24 1 chomp($raw);
25  
26 1 my $self = {
27 command => $command,
28 arguments => $arguments,
29 raw => $raw,
30 };
31  
32 1 return bless $self, $class;
33  
34 }
35  
36 0 ▶sub raw {
Subroutine raw: not called CC=1 SCAR=6.9
Pod documented
37 0 my ($self) = @_;
38 0 return $self->{raw};
39 }
40  
41 3 ▶sub command {
Subroutine command: called CC=1 SCAR=0.0
Pod documented
42 3 my ($self) = @_;
43 3 return $self->{command};
44 }
45  
46 0 ▶sub arguments {
Subroutine arguments: not called CC=1 SCAR=6.9
Pod documented
47 0 my ($self) = @_;
48 0 return $self->{arguments};
49 }
50  
51 2 1;
52 __END__
« OpenVAS/Error.pm ↑ Summary OpenVAS.pm »