Net::Domain(3perl)

Net::Domain3perl

Attempt to evaluate the current host's internet name and domain

Usage

    use Net::Domain qw(hostname hostfqdn hostdomain domainname);

Overview

Using various methods attempt to find the Fully Qualified Domain Name (FQDN) of the current host. From this determine the host-name and the host-domain.

Each of the functions will return undef if the FQDN cannot be determined.

Functions

hostfqdn()

Identify and return the FQDN of the current host.

domainname()

An alias for hostfqdn().

hostname()

Returns the smallest part of the FQDN which can be used to identify the host.

hostdomain()

Returns the remainder of the FQDN after the hostname has been removed.

Exports

The following symbols are, or can be, exported by this module:

Default Exports

None.

Optional Exports

"hostname", "hostdomain", "hostfqdn", "domainname".

Export Tags

None.

Known bugs

See <https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=libnet>.

Licence

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e. under the terms of either the GNU General Public License or the Artistic License, as specified in the LICENCE file.

Version

Version 3.15

Date

20 March 2023

Releases

12 releases since Debian 3.1 (Sarge); the text changed 11 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11
  10. 12
  11. 13
  12. Arch