GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Zonemaster::Engine::DNSName(3) User Contributed Perl Documentation Zonemaster::Engine::DNSName(3)

Zonemaster::Engine::DNSName - class representing DNS names

    my $name1 = Zonemaster::Name->new('www.example.org');
    my $name2 = Zonemaster::Name->new('ns.example.org');
    say "Yay!" if $name1->common($name2) == 2;

A reference to a list of strings, being the labels the DNS name is made up from.

The constructor can be called with either a single argument or with a reference to a hash as in the example above.

If there is a single argument, it must be either a non-reference, a Zonemaster::Engine::DNSName object or a Zonemaster::Engine::Zone object.

If it's a non-reference, it will be split at period characters (possibly after stringification) and the resulting list used as the name's labels.

If it's a Zonemaster::Engine::DNSName object it will simply be returned.

If it's a Zonemaster::Engine::Zone object, the value of its "name" attribute will be returned.

A specialized constructor that must be called with a string.
Returns a string representation of the name. The string representation is created by joining the labels with dots. If there are no labels, a single dot is returned. The names created this way do not have a trailing dot.

The stringification operator is overloaded to this function, so it should rarely be necessary to call it directly.

Returns the name as a string complete with a trailing dot.
Overloads string comparison. Comparison is made after converting the names to upper case, and ignores any trailing dot on the other name.
Returns a new Zonemaster::Engine::DNSName object, representing the name of the called one with the leftmost label removed.
Returns the number of labels from the rightmost going left that are the same in both names. Used by the recursor to check for redirections going up the DNS tree.
Returns true if $other is in-bailiwick of $self, and false otherwise. See also <https://tools.ietf.org/html/rfc7719#section-6>.
Returns a new Zonemaster::Engine::DNSName object, representing the called one with the given label prepended.
Helper method for JSON encoding.
2025-02-24 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.