Farly/ASA/ICMPFormatter.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 66.6% 2 / 3 totaltotal 95.8% 23 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Farly/Builder.pm ↑ Summary Farly/ASA/PortFormatter.pm »
1 package Farly::ASA::ICMPFormatter;
2
3 10 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7 10 our $VERSION = '0.26';
8
9 10 our $String_To_Int = {
10 "echo-reply" => 0,
11 "unreachable" => 3,
12 "source-quench" => 4,
13 "redirect" => 5,
14 "alternate-address" => 6,
15 "echo" => 8,
16 "router-advertisement" => 9,
17 "router-solicitation" => 10,
18 "time-exceeded" => 11,
19 "parameter-problem" => 12,
20 "timestamp-request" => 13,
21 "timestamp-reply" => 14,
22 "information-request" => 15,
23 "information-reply" => 16,
24 "mask-request" => 17,
25 "mask-reply" => 18,
26 "traceroute" => 30,
27 "conversion-error" => 31,
28 "mobile-redirect" => 32,
29 };
30
31 10 our $Int_To_String = { reverse %$String_To_Int };
32
33 9 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
34 9 return bless {}, $_[0];
35 }
36
37 3 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
38 3 return $Int_To_String->{ $_[1] };
39 }
40
41 41 ▶sub as_integer {
Subroutine as_integer: called CC=1 SCAR=0.0
Pod documented
42 41 return $String_To_Int->{ $_[1] };
43 }
44
45 10 1;
46 __END__
« Farly/Builder.pm ↑ Summary Farly/ASA/PortFormatter.pm »