David Muir Sharnoff > File-Slurp-Remote-0.44 > package

Download:
modules/File-Slurp-Remote-0.44.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

package File::Slurp::Remote::CanonicalHostnames - a hostname canonicalizer example

SYNOPSIS ^

 use File::Slurp::Remote::CanonicalHostnames;

 my $canonicalizer = File::Slurp::Remote:CanonicalHostnames->new();

 my $my_hostname = $canonicalizer->myname;

 my $canonical_hostname = $canonicalizer->canonicalize($hostname);

DESCRIPTION ^

Some people use real hostnames with forward and reverse DNS set up correctly. Other people do not. Sometimes there is more than one name for a host. Because of these variations, Proc::JobQueue cannot depend on any one way to figure out if two hostnames are actually the same host.

This package, File::Slurp::Remote::CanonicalHostnames provides an example and interface specification for how Proc::JobQueue will ask these questions. Proc::JobQueue will use this package by default, but you can override this behavior when you create Proc::JobQueue objects and use a different package that provides the same interface.

File::Slurp::Remote::CannonicalHostnames uses File::Slurp::Remote::BrokenDNS to do its work.

INTERFACE ^

There following methods are required:

^

new()

The constructor new, takes no arguments.

myname()

This must return the local hostname. This must already be in canonical form.

canonicalize($hostname)

This returns the canonical form of a hostname. If there is more than one way to refer to the same host, all the different ways should return the same canonical form.

LICENSE ^

Copyright (C) 2011 Google, Inc. This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.

syntax highlighting: