Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Dumpvalue.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "Dumpvalue 3pm"
61 .TH Dumpvalue 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 Dumpvalue \- provides screen dump of Perl data.
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 6
71 \& use Dumpvalue;
72 \& my $dumper = Dumpvalue\->new;
73 \& $dumper\->set(globPrint => 1);
74 \& $dumper\->dumpValue(\e*::);
75 \& $dumper\->dumpvars(\*(Aqmain\*(Aq);
76 \& my $dump = $dumper\->stringify($some_value);
77 .Ve
78 .SH DESCRIPTION
79 .IX Header "DESCRIPTION"
80 .SS Creation
81 .IX Subsection "Creation"
82 A new dumper is created by a call
83 .PP
84 .Vb 1
85 \& $d = Dumpvalue\->new(option1 => value1, option2 => value2)
86 .Ve
87 .PP
88 Recognized options:
89 .ie n .IP """arrayDepth"", ""hashDepth""" 4
90 .el .IP "\f(CWarrayDepth\fR, \f(CWhashDepth\fR" 4
91 .IX Item "arrayDepth, hashDepth"
92 Print only first N elements of arrays and hashes. If false, prints all the
93 elements.
94 .ie n .IP """compactDump"", ""veryCompact""" 4
95 .el .IP "\f(CWcompactDump\fR, \f(CWveryCompact\fR" 4
96 .IX Item "compactDump, veryCompact"
97 Change style of array and hash dump. If true, short array
98 may be printed on one line.
99 .ie n .IP """globPrint""" 4
100 .el .IP \f(CWglobPrint\fR 4
101 .IX Item "globPrint"
102 Whether to print contents of globs.
103 .ie n .IP """dumpDBFiles""" 4
104 .el .IP \f(CWdumpDBFiles\fR 4
105 .IX Item "dumpDBFiles"
106 Dump arrays holding contents of debugged files.
107 .ie n .IP """dumpPackages""" 4
108 .el .IP \f(CWdumpPackages\fR 4
109 .IX Item "dumpPackages"
110 Dump symbol tables of packages.
111 .ie n .IP """dumpReused""" 4
112 .el .IP \f(CWdumpReused\fR 4
113 .IX Item "dumpReused"
114 Dump contents of "reused" addresses.
115 .ie n .IP """tick"", ""quoteHighBit"", ""printUndef""" 4
116 .el .IP "\f(CWtick\fR, \f(CWquoteHighBit\fR, \f(CWprintUndef\fR" 4
117 .IX Item "tick, quoteHighBit, printUndef"
118 Change style of string dump. Default value of \f(CW\*(C`tick\*(C'\fR is \f(CW\*(C`auto\*(C'\fR, one
119 can enable either double\-quotish dump, or single\-quotish by setting it
120 to \f(CW\*(C`"\*(C'\fR or \f(CW\*(C`\*(Aq\*(C'\fR. By default, characters with high bit set are printed
121 \&\fIas is\fR. If \f(CW\*(C`quoteHighBit\*(C'\fR is set, they will be quoted.
122 .ie n .IP """usageOnly""" 4
123 .el .IP \f(CWusageOnly\fR 4
124 .IX Item "usageOnly"
125 rudimentary per\-package memory usage dump. If set,
126 \&\f(CW\*(C`dumpvars\*(C'\fR calculates total size of strings in variables in the package.
127 .IP unctrl 4
128 .IX Item "unctrl"
129 Changes the style of printout of strings. Possible values are
130 \&\f(CW\*(C`unctrl\*(C'\fR and \f(CW\*(C`quote\*(C'\fR.
131 .IP subdump 4
132 .IX Item "subdump"
133 Whether to try to find the subroutine name given the reference.
134 .IP bareStringify 4
135 .IX Item "bareStringify"
136 Whether to write the non\-overloaded form of the stringify\-overloaded objects.
137 .IP quoteHighBit 4
138 .IX Item "quoteHighBit"
139 Whether to print chars with high bit set in binary or "as is".
140 .IP stopDbSignal 4
141 .IX Item "stopDbSignal"
142 Whether to abort printing if debugger signal flag is raised.
143 .PP
144 Later in the life of the object the methods may be queries with \fBget()\fR
145 method and \fBset()\fR method (which accept multiple arguments).
146 .SS Methods
147 .IX Subsection "Methods"
148 .IP dumpValue 4
149 .IX Item "dumpValue"
150 .Vb 2
151 \& $dumper\->dumpValue($value);
152 \& $dumper\->dumpValue([$value1, $value2]);
153 .Ve
154 .Sp
155 Prints a dump to the currently selected filehandle.
156 .IP dumpValues 4
157 .IX Item "dumpValues"
158 .Vb 1
159 \& $dumper\->dumpValues($value1, $value2);
160 .Ve
161 .Sp
162 Same as \f(CW\*(C`$dumper\->dumpValue([$value1, $value2]);\*(C'\fR.
163 .IP stringify 4
164 .IX Item "stringify"
165 .Vb 1
166 \& my $dump = $dumper\->stringify($value [,$noticks] );
167 .Ve
168 .Sp
169 Returns the dump of a single scalar without printing. If the second
170 argument is true, the return value does not contain enclosing ticks.
171 Does not handle data structures.
172 .IP dumpvars 4
173 .IX Item "dumpvars"
174 .Vb 2
175 \& $dumper\->dumpvars(\*(Aqmy_package\*(Aq);
176 \& $dumper\->dumpvars(\*(Aqmy_package\*(Aq, \*(Aqfoo\*(Aq, \*(Aq~bar$\*(Aq, \*(Aq!......\*(Aq);
177 .Ve
178 .Sp
179 The optional arguments are considered as literal strings unless they
180 start with \f(CW\*(C`~\*(C'\fR or \f(CW\*(C`!\*(C'\fR, in which case they are interpreted as regular
181 expressions (possibly negated).
182 .Sp
183 The second example prints entries with names \f(CW\*(C`foo\*(C'\fR, and also entries
184 with names which ends on \f(CW\*(C`bar\*(C'\fR, or are shorter than 5 chars.
185 .IP set_quote 4
186 .IX Item "set_quote"
187 .Vb 1
188 \& $d\->set_quote(\*(Aq"\*(Aq);
189 .Ve
190 .Sp
191 Sets \f(CW\*(C`tick\*(C'\fR and \f(CW\*(C`unctrl\*(C'\fR options to suitable values for printout with the
192 given quote char. Possible values are \f(CW\*(C`auto\*(C'\fR, \f(CW\*(C`\*(Aq\*(C'\fR and \f(CW\*(C`"\*(C'\fR.
193 .IP set_unctrl 4
194 .IX Item "set_unctrl"
195 .Vb 1
196 \& $d\->set_unctrl(\*(Aqunctrl\*(Aq);
197 .Ve
198 .Sp
199 Sets \f(CW\*(C`unctrl\*(C'\fR option with checking for an invalid argument.
200 Possible values are \f(CW\*(C`unctrl\*(C'\fR and \f(CW\*(C`quote\*(C'\fR.
201 .IP compactDump 4
202 .IX Item "compactDump"
203 .Vb 1
204 \& $d\->compactDump(1);
205 .Ve
206 .Sp
207 Sets \f(CW\*(C`compactDump\*(C'\fR option. If the value is 1, sets to a reasonable
208 big number.
209 .IP veryCompact 4
210 .IX Item "veryCompact"
211 .Vb 1
212 \& $d\->veryCompact(1);
213 .Ve
214 .Sp
215 Sets \f(CW\*(C`compactDump\*(C'\fR and \f(CW\*(C`veryCompact\*(C'\fR options simultaneously.
216 .IP set 4
217 .IX Item "set"
218 .Vb 1
219 \& $d\->set(option1 => value1, option2 => value2);
220 .Ve
221 .IP get 4
222 .IX Item "get"
223 .Vb 1
224 \& @values = $d\->get(\*(Aqoption1\*(Aq, \*(Aqoption2\*(Aq);
225 .Ve