NAME

Util::Medley::Hostname - Utilities for dealing with hostnames.

VERSION

version 0.031

SYNOPSIS

my $util = Util::Medley::Host->new;
my ($hostname, $domain) = $util->parseHostname('foobar.example.com');

DESCRIPTION

Utility module for slicing and dicing hostnames.

All methods confess on error.

METHODS

parseHostname

Parses the specified hostname into hostname and domain (if exists).

usage:
my ($hostname, $domain) = 
    $util->parseHostname('foobar.example.com');

my ($hostname, $domain) = 
    $util->parseHostname(hostname => 'foobar.example.com');
args:
hostname [Str]

Hostname you wish to parse.

isFqdn

Checks if a given hostname is fully qualified.

usage:
my $bool = $util->isFqdn('foobar.example.com');

my $bool = $util->isFqdn(hostname => 'foobar.example.com');
args:
hostname [Str]

Hostname to be checked.