The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::Slurp::Remote::BrokenDNS - discover canonical hostnames, sometimes with `hostname`

SYNOPSIS

 BEGIN { $ENV{BROKEN_DNS_WORKAROUND} = 1 };

 use File::Slurp::Remote::BrokenDNS qw($myfqdn %fqdnify);

 print "alias for me\n" if $myfqdn eq $fqdnify{$host2};

DESCRIPTION

This module finds canonical fully qualified domain names. It ties the hash %fqdnify to map from hostnames to canonical fully qualified domain names. If the environment variable BROKEN_DNS_WORKAROUND is set, then it uses ssh and hostname to do the work. Otherwise it does a forward DNS lookup to get an address then a reverse DNS lookup to get the hostname from the address.

LICENSE

This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.