blib/lib/MooseX/Types/PortNumber.pm

filter: Statementstmt 87.8% 29 / 33 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 76.4% 13 / 17 Podpod n/a totaltotal 72.4% 42 / 58 CC 5 SCAR 10.7
CC
5
Cov
71%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 2.9
↑ Summary
1 package MooseX::Types::PortNumber;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.03';
8  
9 1 ▶use MooseX::Types -declare =>
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 [qw(PortNumber PortWellKnow PortRegistered PortPrivate)];
11 1 ▶use MooseX::Types::Moose qw(Int);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 subtype PortNumber,
14 as Int,
15 0 ▶ where { $_ >= 0 && $_ <= 65535 },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 0 and $_ <= 65535 0 0 0
16 2 ▶ inline_as {
Subroutine __ANON__: called CC=1 SCAR=0.0
17 2 $_[0]->parent()->_inline_check( $_[1] )
18 . " && ( $_[1] >= 0 && $_[1] <= 65535 ) "
19 },
20 1 ▶ message {'Ports are those from 0 through 65535'};
Subroutine __ANON__: called CC=1 SCAR=0.0
21  
22 subtype PortWellKnow,
23 as Int,
24 0 ▶ where { $_ >= 0 && $_ <= 1023 },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 0 and $_ <= 1023 0 0 0
25 2 ▶ inline_as {
Subroutine __ANON__: called CC=1 SCAR=0.0
26 2 $_[0]->parent()->_inline_check( $_[1] )
27 . " && ( $_[1] >= 0 && $_[1] <= 1023 ) "
28 },
29 1 ▶ message {'The Well Known Ports are those from 0 through 1023.'};
Subroutine __ANON__: called CC=1 SCAR=0.0
30  
31 subtype PortRegistered,
32 as Int,
33 0 ▶ where { $_ >= 1024 && $_ <= 49151 },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 1024 and $_ <= 49151 0 0 0
34 2 ▶ inline_as {
Subroutine __ANON__: called CC=1 SCAR=0.0
35 2 $_[0]->parent()->_inline_check( $_[1] )
36 . " && ( $_[1] >= 1024 && $_[1] <= 49151 ) "
37 },
38 1 ▶ message {'The Registered Ports are those from 1024 through 49151'};
Subroutine __ANON__: called CC=1 SCAR=0.0
39  
40 subtype PortPrivate,
41 as Int,
42 0 ▶ where { $_ >= 49152 && $_ <= 65535 },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 49152 and $_ <= 65535 0 0 0
43 2 ▶ inline_as {
Subroutine __ANON__: called CC=1 SCAR=0.0
44 2 $_[0]->parent()->_inline_check( $_[1] )
45 . " && ( $_[1] >= 49152 && $_[1] <= 65535 ) "
46 },
47 1 ▶ message {
Subroutine __ANON__: called CC=1 SCAR=0.0
48 1 'The Dynamic and/or Private Ports are those from 49152 through 65535'
49 1 };
50  
51 1 1;
52  
53 # ABSTRACT: Port number type for moose classes by The Internet Assigned Numbers Authority (IANA)
54  
55 __END__
↑ Summary