File Coverage

blib/lib/Net/IP/Identifier/Plugin/VPLS.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition 1 3 33.3
subroutine 6 6 100.0
pod 1 2 50.0
total 26 29 89.6


line stmt bran cond sub pod time code
1             #===============================================================================
2             # PODNAME: Net::IP::Identifier::Plugin::VPLS
3             # ABSTRACT: identify VPLS/Krypt (AS45652, AS4213, AS35908) owned IP addresses
4             #
5             # AUTHOR: Reid Augustin (REID)
6             # EMAIL: reid@hellosix.com
7             # CREATED: Sun Oct 12 19:32:46 PDT 2014
8             #===============================================================================
9              
10 1     1   36 use 5.008;
  1         4  
  1         54  
11 1     1   7 use strict;
  1         3  
  1         58  
12 1     1   8 use warnings;
  1         3  
  1         58  
13              
14             #_ENTITY_REGEX_ vpls|krypt
15              
16             package Net::IP::Identifier::Plugin::VPLS;
17              
18 1     1   6 use Role::Tiny::With;
  1         3  
  1         246  
19             with qw( Net::IP::Identifier_Role );
20              
21             our $VERSION = '0.110'; # VERSION
22              
23             sub new {
24 1     1 1 4 my ($class, %opts) = @_;
25              
26 1         3 my $self = {};
27 1   33     8 bless $self, (ref $class || $class);
28              
29             # List of known VPLS/Krypt (AS45652, AS4213, AS35908) IP blocks as of May 2015
30 1         5 $self->ips(
31             # 24 Network Blocks
32             '23.91.192.0/19',
33             '23.251.0.0/19',
34             '43.252.120.0/22',
35             '66.186.32.0/19',
36             '67.198.128.0/17',
37             '67.229.0.0/16',
38             '74.222.128.0/18',
39             '96.62.0.0/16',
40             '98.126.0.0/16',
41             '100.43.128.0/18',
42             '103.233.80.0/22',
43             '104.200.192.0/19',
44             '107.6.192.0/18',
45             '110.34.139.0/24',
46             '110.34.220.0/22',
47             '173.214.0.0/17',
48             '174.139.0.0/16',
49             '184.75.176.0/20',
50             '184.83.0.0/16',
51             '184.164.192.0/19',
52             '192.174.96.0/19',
53             '198.61.96.0/19',
54             '209.11.240.0/20',
55             '2607:f180::/31',
56             );
57 1         10 return $self;
58             }
59              
60             sub name {
61 3     3 0 14 return 'VPLS';
62             }
63              
64             1;
65              
66             __END__