Commit 899482e1 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Merge branch 'netipfix-0.1.x' into 'v0.1.x'

Fixed warning for v0.1.x usage of Socket* modules

See merge request !17
parents bf8c36e8 1bd314ad
......@@ -29,16 +29,8 @@ package awitpt::netip;
use strict;
use warnings;
use Socket;
BEGIN {
if (defined &Socket::inet_pton) {
Socket->import(qw(inet_pton AF_INET6));
} else {
require Socket6;
Socket6->import(qw(inet_pton AF_INET6));
}
};
use Socket qw(inet_aton);
use Socket6 qw(inet_pton AF_INET6);
# Our current error message
my $error = "";
......@@ -211,6 +203,7 @@ sub _cidr2mask_v6 {
# Function to match an v4 address
sub _ipv4_matcher {
no locale;
my ($self,$test) = @_;
my $mask = $test->_cidr2mask_v4();
......@@ -222,6 +215,7 @@ sub _ipv4_matcher {
# Function to match an v6 address
sub _ipv6_matcher {
no locale;
my ($self,$test) = @_;
my $mask = $test->_cidr2mask_v6();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment