Net::DNS::Text(3)
πΈ NAME πΈ
okay so bestie, this is the user-contributed Perl documentation for Net::DNS::Text β DNS text representation. That's the name section, short and iconic. π
β¨ SYNOPSIS β¨
here's the whole vibe in code, no cap:
use Net::DNS::Text;
$object = Net::DNS::Text->new('example');
$string = $object->string;
$object = Net::DNS::Text->decode( \$data, $offset );
( $object, $next ) = Net::DNS::Text->decode( \$data, $offset );
$data = $object->encode;
$text = $object->value;
π¦ DESCRIPTION π¦
The Net::DNS::Text module implements a class of text objects with associated class and instance methods.
Every text object instance has a fixed identity throughout its lifetime. Literally no identity crisis, periodt. π
π METHODS π
π§ new π§
$object = Net::DNS::Text->new('example');
Creates a text object which encapsulates a single character string component of a resource record.
Arbitrary single-byte characters can be represented by \ followed by exactly three decimal digits. Such characters are devoid of any special meaning.
A character preceded by \ represents itself, without any special interpretation. It's giving "just be yourself" but in DNS text form. π«Ά
π decode π
$object = Net::DNS::Text->decode( \$buffer, $offset );
( $object, $next ) = Net::DNS::Text->decode( \$buffer, $offset );
Creates a text object which represents the decoded data at the indicated offset within the data buffer.
The argument list consists of a reference to a scalar containing the wire-format data and offset of the text data.
The returned offset value indicates the start of the next item in the data buffer. So $next is your little arrow to the next thing. β‘οΈ
π¦ encode π¦
$data = $object->encode;
Returns the wire-format encoded representation of the text object suitable for inclusion in a DNS packet buffer. Slap it in a DNS packet buffer and it's ready. β¨
π§ raw π§
$data = $object->raw;
Returns the wire-format encoded representation of the text object without the explicit length field. yes, the length field is not invited to this one. π
π value π
$value = $text->value;
Character string representation of the text object.
π string π
$string = $text->string;
Conditionally quoted RFC1035 zone file representation of the text object.
π unicode π
$string = $text->unicode;
Conditionally quoted Unicode representation of the text object.
π BUGS π
Coding strategy is intended to avoid creating unnecessary argument lists and stack frames. This improves efficiency at the expense of code readability. highkey a tradeoff, but that's the tea. βοΈ
Platform specific character coding features are conditionally compiled into the code.
π COPYRIGHT π
Copyright (c)2009-2011 Dick Franks.
All rights reserved.
π LICENSE π
Now the legal tea, bestie, no skipping βοΈ:
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
π«Ά SEE ALSO π«Ά
perlNet::DNSRFC1035 <https://iana.org/go/rfc1035>RFC3629 <https://iana.org/go/rfc3629>
okay bye bestie π this page is from perl v5.42.0, dated 2026-09-02, and it's the Net::DNS::Text(3) manual page. mwah π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Net-DNS 1.570.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms