Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
awit-frameworks
awit-perl-toolkit
Commits
26d09a12
Commit
26d09a12
authored
Mar 28, 2017
by
Nigel Kukard
Browse files
Merge branch 'netipfix-master' into 'master'
Fixed warning for v1.0.x usage of Socket* modules See merge request
!19
parents
eba048e5
c8ef4b04
Pipeline
#1183
passed with stages
in 2 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/AWITPT/NetIP.pm
View file @
26d09a12
...
@@ -31,16 +31,8 @@ use warnings;
...
@@ -31,16 +31,8 @@ use warnings;
our
$VERSION
=
"
1.000
";
our
$VERSION
=
"
1.000
";
use
Socket
;
use
Socket
qw(inet_aton)
;
BEGIN
{
use
Socket6
qw(inet_pton AF_INET6)
;
if
(
defined
&
Socket::
inet_pton
)
{
Socket
->
import
(
qw(inet_pton AF_INET6)
);
}
else
{
require
Socket6
;
Socket6
->
import
(
qw(inet_pton AF_INET6)
);
}
};
# Our current error message
# Our current error message
my
$error
=
"";
my
$error
=
"";
...
@@ -213,6 +205,7 @@ sub _cidr2mask_v6 {
...
@@ -213,6 +205,7 @@ sub _cidr2mask_v6 {
# Function to match an v4 address
# Function to match an v4 address
sub
_ipv4_matcher
{
sub
_ipv4_matcher
{
no
locale
;
my
(
$self
,
$test
)
=
@_
;
my
(
$self
,
$test
)
=
@_
;
my
$mask
=
$test
->
_cidr2mask_v4
();
my
$mask
=
$test
->
_cidr2mask_v4
();
...
@@ -224,6 +217,7 @@ sub _ipv4_matcher {
...
@@ -224,6 +217,7 @@ sub _ipv4_matcher {
# Function to match an v6 address
# Function to match an v6 address
sub
_ipv6_matcher
{
sub
_ipv6_matcher
{
no
locale
;
my
(
$self
,
$test
)
=
@_
;
my
(
$self
,
$test
)
=
@_
;
my
$mask
=
$test
->
_cidr2mask_v6
();
my
$mask
=
$test
->
_cidr2mask_v6
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment