logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Net::Domain - Attempt to evaluate the current host's internet name and domain

Author

Graham Barr <gbarr@pobox.com <mailto:gbarr@pobox.com>>. Adapted from Sys::Hostname by David Sundstrom <sunds@asictest.sc.ti.com <mailto:sunds@asictest.sc.ti.com>>. Steve Hay <shay@cpan.org <mailto:shay@cpan.org>> is now maintaining libnet as of version 1.22_02.

Date

20 March 2023

Description

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.

History

See the Changes file. perl v5.40.1 2025-07-27 Net::Domain(3perl)

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.

Name

Net::Domain - Attempt to evaluate the current host's internet name and domain

Synopsis

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

Version

Version 3.15

See Also