{
    "content": [
        {
            "type": "text",
            "text": "# Net::DNS::DomainName (perldoc)\n\n## NAME\n\nNet::DNS::DomainName - DNS name representation\n\n## SYNOPSIS\n\nuse Net::DNS::DomainName;\n$object = Net::DNS::DomainName->new('example.com');\n$name = $object->name;\n$data = $object->encode;\n( $object, $next ) = Net::DNS::DomainName->decode( \\$data, $offset );\n\n## DESCRIPTION\n\nThe Net::DNS::DomainName module implements the concrete representation of DNS domain names used\nwithin DNS packets.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **Net::DNS::DomainName1035**\n- **Net::DNS::DomainName2535**\n- **COPYRIGHT**\n- **LICENSE**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::DNS::DomainName",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::DNS::DomainName - DNS name representation",
        "synopsis": "use Net::DNS::DomainName;\n$object = Net::DNS::DomainName->new('example.com');\n$name = $object->name;\n$data = $object->encode;\n( $object, $next ) = Net::DNS::DomainName->decode( \\$data, $offset );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "Net::DNS::DomainName1035",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "Net::DNS::DomainName2535",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::DNS::DomainName - DNS name representation\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::DNS::DomainName;\n\n$object = Net::DNS::DomainName->new('example.com');\n$name = $object->name;\n$data = $object->encode;\n\n( $object, $next ) = Net::DNS::DomainName->decode( \\$data, $offset );\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The Net::DNS::DomainName module implements the concrete representation of DNS domain names used\nwithin DNS packets.\n\nNet::DNS::DomainName defines methods for encoding and decoding wire format octet strings. All\nother behaviour is inherited from Net::DNS::Domain.\n\nThe Net::DNS::DomainName1035 and Net::DNS::DomainName2535 packages implement disjoint domain\nname subtypes which provide the name compression and canonicalisation specified by RFC1035 and\nRFC2535. These are necessary to meet the backward compatibility requirements introduced by\nRFC3597.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\n$object = Net::DNS::DomainName->new('example.com');\n\nCreates a domain name object which identifies the domain specified by the character string\nargument.\n\ncanonical\n$data = $object->canonical;\n\nReturns the canonical wire-format representation of the domain name as defined in RFC2535(8.1).\n\ndecode\n$object = Net::DNS::DomainName->decode( \\$buffer, $offset, $hash );\n\n( $object, $next ) = Net::DNS::DomainName->decode( \\$buffer, $offset, $hash );\n\nCreates a domain name object which represents the DNS domain name identified by the wire-format\ndata at the indicated offset within the data buffer.\n\nThe argument list consists of a reference to a scalar containing the wire-format data and\nspecified offset. The optional reference to a hash table provides improved efficiency of\ndecoding compressed names by exploiting already cached compression pointers.\n\nThe returned offset value indicates the start of the next item in the data buffer.\n\nencode\n$data = $object->encode;\n\nReturns the wire-format representation of the domain name suitable for inclusion in a DNS packet\nbuffer.\n",
                "subsections": []
            },
            "Net::DNS::DomainName1035": {
                "content": "Net::DNS::DomainName1035 implements a subclass of domain name objects which are to be encoded\nusing the compressed wire format defined in RFC1035.\n\nuse Net::DNS::DomainName;\n\n$object = Net::DNS::DomainName1035->new('compressible.example.com');\n$data   = $object->encode( $offset, $hash );\n\n( $object, $next ) = Net::DNS::DomainName1035->decode( \\$data, $offset );\n\nNote that RFC3597 implies that the RR types defined in RFC1035 section 3.3 are the only types\neligible for compression.\n\nencode\n$data = $object->encode( $offset, $hash );\n\nReturns the wire-format representation of the domain name suitable for inclusion in a DNS packet\nbuffer.\n\nThe optional arguments are the offset within the packet data where the domain name is to be\nstored and a reference to a hash table used to index compressed names within the packet.\n\nIf the hash reference is undefined, encode() returns the lowercase uncompressed canonical\nrepresentation defined in RFC2535(8.1).\n",
                "subsections": []
            },
            "Net::DNS::DomainName2535": {
                "content": "Net::DNS::DomainName2535 implements a subclass of domain name objects which are to be encoded\nusing uncompressed wire format.\n\nNote that RFC3597, and latterly RFC4034, specifies that the lower case canonical encoding\ndefined in RFC2535 is to be used for RR types defined prior to RFC3597.\n\nuse Net::DNS::DomainName;\n\n$object = Net::DNS::DomainName2535->new('incompressible.example.com');\n$data   = $object->encode( $offset, $hash );\n\n( $object, $next ) = Net::DNS::DomainName2535->decode( \\$data, $offset );\n\nencode\n$data = $object->encode( $offset, $hash );\n\nReturns the uncompressed wire-format representation of the domain name suitable for inclusion in\na DNS packet buffer.\n\nIf the hash reference is undefined, encode() returns the lowercase canonical form defined in\nRFC2535(8.1).\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c)2009-2011 Dick Franks.\n\nAll rights reserved.\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Permission to use, copy, modify, and distribute this software and its documentation for any\npurpose and without fee is hereby granted, provided that the original copyright notices appear\nin all copies and that both copyright notice and this permission notice appear in supporting\ndocumentation, and that the name of the author not be used in advertising or publicity\npertaining to distribution of the software without specific prior written permission.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\nBUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "perl, Net::DNS, Net::DNS::Domain, RFC1035, RFC2535, RFC3597, RFC4034\n",
                "subsections": []
            }
        }
    }
}