esmith::HostsDB - interface to esmith hostnames/addresses database
use esmith::HostsDB;
my $hosts = esmith::HostsDB->open;
# everything else works just like esmith::DB::db
# these methods are added
my @hosts = $hosts->hosts;
my @new_hosts = $hosts->propogate_hosts;
This module provides an abstracted interface to the esmith hosts
database.
Unless otherwise noted, esmith::HostsDB acts like esmith::DB::db.
- open
-
Like esmith::DB->open, but if given no $file it will try to open the
file in the ESMITH_HOSTS_DB environment variable or hosts.
Like esmith::DB->open_ro, but if given no $file it will try to open the
file in the ESMITH_HOSTS_DB environment variable or hosts.
These methods are added be esmith::HostsDB
- hosts
-
my @hosts = $hosts->hosts;
-
Returns a list of all host records in the database.
- propogate_hosts
-
my @new_hosts = $hosts->propogate_hosts($old_name, $new_name);
-
When the name of your e-smith machine changes, this will change the
name of any hosts which also started with $old_name to use the
$new_name.
-
Returns a list of the newly tranlsated host records.
Given a domain name (as a string), finds any hosts which match it and
return them as a list of record objects.
SME Server Developers <bugs@e-smith.com>
the esmith::ConfigDB manpage
|