{
    "mode": "perldoc",
    "parameter": "Net::DNS::Text",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ADNS%3A%3AText/json",
    "generated": "2026-07-05T13:42:43Z",
    "synopsis": "use Net::DNS::Text;\n$object = Net::DNS::Text->new('example');\n$string = $object->string;\n$object = Net::DNS::Text->decode( \\$data, $offset );\n( $object, $next ) = Net::DNS::Text->decode( \\$data, $offset );\n$data = $object->encode;\n$text = $object->value;",
    "sections": {
        "NAME": {
            "content": "Net::DNS::Text - DNS text representation\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Net::DNS::Text;\n\n$object = Net::DNS::Text->new('example');\n$string = $object->string;\n\n$object = Net::DNS::Text->decode( \\$data, $offset );\n( $object, $next ) = Net::DNS::Text->decode( \\$data, $offset );\n\n$data = $object->encode;\n$text = $object->value;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The \"Net::DNS::Text\" module implements a class of text objects with associated class and\ninstance methods.\n\nEach text object instance has a fixed identity throughout its lifetime.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\n$object = Net::DNS::Text->new('example');\n\nCreates a text object which encapsulates a single character string component of a resource\nrecord.\n\nArbitrary single-byte characters can be represented by \\ followed by exactly three decimal\ndigits. Such characters are devoid of any special meaning.\n\nA character preceded by \\ represents itself, without any special interpretation.\n\ndecode\n$object = Net::DNS::Text->decode( \\$buffer, $offset );\n\n( $object, $next ) = Net::DNS::Text->decode( \\$buffer, $offset );\n\nCreates a text object which represents the decoded data at the indicated offset within the data\nbuffer.\n\nThe argument list consists of a reference to a scalar containing the wire-format data and offset\nof the text data.\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 encoded representation of the text object suitable for inclusion in a\nDNS packet buffer.\n\nraw\n$data = $object->raw;\n\nReturns the wire-format encoded representation of the text object without the explicit length\nfield.\n\nvalue\n$value = $text->value;\n\nCharacter string representation of the text object.\n\nstring\n$string = $text->string;\n\nConditionally quoted RFC1035 zone file representation of the text object.\n\nunicode\n$string = $text->unicode;\n\nConditionally quoted Unicode representation of the text object.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Coding strategy is intended to avoid creating unnecessary argument lists and stack frames. This\nimproves efficiency at the expense of code readability.\n\nPlatform specific character coding features are conditionally compiled into the code.\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, RFC1035, RFC3629, Unicode TR#16\n",
            "subsections": []
        }
    },
    "summary": "Net::DNS::Text - DNS text representation",
    "flags": [],
    "examples": [],
    "see_also": []
}