blib/lib/Regexp/IPv4.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 9 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 12 | 12 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Regexp::IPv4; | ||||||
2 | |||||||
3 | our $DATE = '2016-10-18'; # DATE | ||||||
4 | our $VERSION = '0.002'; # VERSION | ||||||
5 | |||||||
6 | 1 | 1 | 13426 | use strict; | |||
1 | 2 | ||||||
1 | 25 | ||||||
7 | 1 | 1 | 4 | use warnings; | |||
1 | 1 | ||||||
1 | 25 | ||||||
8 | |||||||
9 | 1 | 1 | 2 | use Exporter qw(import); | |||
1 | 1 | ||||||
1 | 73 | ||||||
10 | our @EXPORT_OK = qw($IPv4_re); | ||||||
11 | |||||||
12 | my $dig_re = '(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})'; | ||||||
13 | our $IPv4_re = "(?:$dig_re(?:\\.$dig_re){3})"; | ||||||
14 | $IPv4_re = qr/$IPv4_re/; | ||||||
15 | |||||||
16 | 1; | ||||||
17 | # ABSTRACT: Regular expression for IPv4 addresses | ||||||
18 | |||||||
19 | __END__ |