Skip to content
GitLab
Menu
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
899482e1
Commit
899482e1
authored
Mar 28, 2017
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/awitpt/netip.pm
View file @
899482e1
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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