release 2.028005

This commit is contained in:
Oliver Gorwits
2014-07-17 14:24:32 +01:00
parent 2a77e13e10
commit 470c106131
4 changed files with 5 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ use strict;
use warnings;
use 5.010_000;
our $VERSION = '2.028004';
our $VERSION = '2.028005';
use App::Netdisco::Configuration;
=head1 NAME

View File

@@ -85,7 +85,7 @@ sub ipv4_from_hostname {
return unless $name;
# check /etc/hosts file and short-circuit if found
if (exists $HOSTS{$name}) {
if (exists $HOSTS{$name} and $HOSTS{$name}->[0]->[0]) {
my $ip = NetAddr::IP::Lite->new($HOSTS{$name}->[0]->[0]);
return $ip->addr if $ip and $ip->bits == 32;
}