blib/lib/Cikl/DataTypes/Ipv4.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Cikl.pm ↑ Summary blib/lib/Cikl/DataTypes/Ipv4Cidr.pm »
1 package Cikl::DataTypes::Ipv4;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Mouse::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Regexp::Common qw/net/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use constant RE_IPV4 => qr/^$RE{'net'}{'IPv4'}$/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 subtype 'Cikl::DataTypes::Ipv4',
11 as 'Str',
12 9 ▶ where { $_ =~ RE_IPV4 },
Subroutine __ANON__: called CC=1 SCAR=0.0
13 5 ▶ message { "Invalid Ipv4 address '$_'"} ;
Subroutine __ANON__: called CC=1 SCAR=0.0
14  
15 2 1;
« blib/lib/Cikl.pm ↑ Summary blib/lib/Cikl/DataTypes/Ipv4Cidr.pm »