1Net::DNS::Text(3)     User Contributed Perl Documentation    Net::DNS::Text(3)
2
3
4

NAME

6       Net::DNS::Text - DNS text representation
7

SYNOPSIS

9           use Net::DNS::Text;
10
11           $object = Net::DNS::Text->new('example');
12           $string = $object->string;
13
14           $object = Net::DNS::Text->decode( \$data, $offset );
15           ( $object, $next ) = Net::DNS::Text->decode( \$data, $offset );
16
17           $data = $object->encode;
18           $text = $object->value;
19

DESCRIPTION

21       The "Net::DNS::Text" module implements a class of text objects with
22       associated class and instance methods.
23
24       Each text object instance has a fixed identity throughout its lifetime.
25

METHODS

27   new
28           $object = Net::DNS::Text->new('example');
29
30       Creates a text object which encapsulates a single character string
31       component of a resource record.
32
33       Arbitrary single-byte characters can be represented by \ followed by
34       exactly three decimal digits. Such characters are devoid of any special
35       meaning.
36
37       A character preceded by \ represents itself, without any special
38       interpretation.
39
40   decode
41           $object = Net::DNS::Text->decode( \$buffer, $offset );
42
43           ( $object, $next ) = Net::DNS::Text->decode( \$buffer, $offset );
44
45       Creates a text object which represents the decoded data at the
46       indicated offset within the data buffer.
47
48       The argument list consists of a reference to a scalar containing the
49       wire-format data and offset of the text data.
50
51       The returned offset value indicates the start of the next item in the
52       data buffer.
53
54   encode
55           $data = $object->encode;
56
57       Returns the wire-format encoded representation of the text object
58       suitable for inclusion in a DNS packet buffer.
59
60   raw
61           $data = $object->raw;
62
63       Returns the wire-format encoded representation of the text object
64       without the explicit length field.
65
66   value
67           $value = $text->value;
68
69       Character string representation of the text object.
70
71   string
72           $string = $text->string;
73
74       Conditionally quoted RFC1035 zone file representation of the text
75       object.
76
77   unicode
78           $string = $text->unicode;
79
80       Conditionally quoted Unicode representation of the text object.
81

BUGS

83       Coding strategy is intended to avoid creating unnecessary argument
84       lists and stack frames. This improves efficiency at the expense of code
85       readability.
86
87       Platform specific character coding features are conditionally compiled
88       into the code.
89
91       Copyright (c)2009-2011 Dick Franks.
92
93       All rights reserved.
94

LICENSE

96       Permission to use, copy, modify, and distribute this software and its
97       documentation for any purpose and without fee is hereby granted,
98       provided that the above copyright notice appear in all copies and that
99       both that copyright notice and this permission notice appear in
100       supporting documentation, and that the name of the author not be used
101       in advertising or publicity pertaining to distribution of the software
102       without specific prior written permission.
103
104       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
105       OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
106       MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
107       IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
108       CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
109       TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
110       SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
111

SEE ALSO

113       perl, Net::DNS, RFC1035, RFC3629, Unicode TR#16
114
115
116
117perl v5.34.0                      2021-07-22                 Net::DNS::Text(3)
Impressum