Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / Dumpvalue.html
blob868d69c48c45740555456d768d697bc124bf5397
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>Dumpvalue - provides screen dump of Perl data.</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;Dumpvalue - provides screen dump of Perl data.</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <ul>
27 <li><a href="#creation">Creation</a></li>
28 <li><a href="#methods">Methods</a></li>
29 </ul>
31 </ul>
32 <!-- INDEX END -->
34 <hr />
35 <p>
36 </p>
37 <h1><a name="name">NAME</a></h1>
38 <p>Dumpvalue - provides screen dump of Perl data.</p>
39 <p>
40 </p>
41 <hr />
42 <h1><a name="synopsis">SYNOPSIS</a></h1>
43 <pre>
44 use Dumpvalue;
45 my $dumper = new Dumpvalue;
46 $dumper-&gt;set(globPrint =&gt; 1);
47 $dumper-&gt;dumpValue(\*::);
48 $dumper-&gt;dumpvars('main');
49 my $dump = $dumper-&gt;stringify($some_value);</pre>
50 <p>
51 </p>
52 <hr />
53 <h1><a name="description">DESCRIPTION</a></h1>
54 <p>
55 </p>
56 <h2><a name="creation">Creation</a></h2>
57 <p>A new dumper is created by a call</p>
58 <pre>
59 $d = new Dumpvalue(option1 =&gt; value1, option2 =&gt; value2)</pre>
60 <p>Recognized options:</p>
61 <dl>
62 <dt><strong><a name="item_arraydepth_2c_hashdepth"><code>arrayDepth</code>, <code>hashDepth</code></a></strong>
64 <dd>
65 <p>Print only first N elements of arrays and hashes. If false, prints all the
66 elements.</p>
67 </dd>
68 </li>
69 <dt><strong><a name="item_compactdump_2c_verycompact"><a href="#item_compactdump"><code>compactDump</code></a>, <a href="#item_verycompact"><code>veryCompact</code></a></a></strong>
71 <dd>
72 <p>Change style of array and hash dump. If true, short array
73 may be printed on one line.</p>
74 </dd>
75 </li>
76 <dt><strong><a name="item_globprint"><code>globPrint</code></a></strong>
78 <dd>
79 <p>Whether to print contents of globs.</p>
80 </dd>
81 </li>
82 <dt><strong><a name="item_dumpdbfiles"><code>dumpDBFiles</code></a></strong>
84 <dd>
85 <p>Dump arrays holding contents of debugged files.</p>
86 </dd>
87 </li>
88 <dt><strong><a name="item_dumppackages"><code>dumpPackages</code></a></strong>
90 <dd>
91 <p>Dump symbol tables of packages.</p>
92 </dd>
93 </li>
94 <dt><strong><a name="item_dumpreused"><code>dumpReused</code></a></strong>
96 <dd>
97 <p>Dump contents of ``reused'' addresses.</p>
98 </dd>
99 </li>
100 <dt><strong><a name="item_tick_2c_quotehighbit_2c_printundef"><code>tick</code>, <a href="#item_quotehighbit"><code>quoteHighBit</code></a>, <code>printUndef</code></a></strong>
102 <dd>
103 <p>Change style of string dump. Default value of <code>tick</code> is <code>auto</code>, one
104 can enable either double-quotish dump, or single-quotish by setting it
105 to <code>&quot;</code> or <code>'</code>. By default, characters with high bit set are printed
106 <em>as is</em>. If <a href="#item_quotehighbit"><code>quoteHighBit</code></a> is set, they will be quoted.</p>
107 </dd>
108 </li>
109 <dt><strong><a name="item_usageonly"><code>usageOnly</code></a></strong>
111 <dd>
112 <p>rudimentally per-package memory usage dump. If set,
113 <a href="#item_dumpvars"><code>dumpvars</code></a> calculates total size of strings in variables in the package.</p>
114 </dd>
115 </li>
116 <dt><strong><a name="item_unctrl">unctrl</a></strong>
118 <dd>
119 <p>Changes the style of printout of strings. Possible values are
120 <a href="#item_unctrl"><code>unctrl</code></a> and <code>quote</code>.</p>
121 </dd>
122 </li>
123 <dt><strong><a name="item_subdump">subdump</a></strong>
125 <dd>
126 <p>Whether to try to find the subroutine name given the reference.</p>
127 </dd>
128 </li>
129 <dt><strong><a name="item_barestringify">bareStringify</a></strong>
131 <dd>
132 <p>Whether to write the non-overloaded form of the stringify-overloaded objects.</p>
133 </dd>
134 </li>
135 <dt><strong><a name="item_quotehighbit">quoteHighBit</a></strong>
137 <dd>
138 <p>Whether to print chars with high bit set in binary or ``as is''.</p>
139 </dd>
140 </li>
141 <dt><strong><a name="item_stopdbsignal">stopDbSignal</a></strong>
143 <dd>
144 <p>Whether to abort printing if debugger signal flag is raised.</p>
145 </dd>
146 </li>
147 </dl>
148 <p>Later in the life of the object the methods may be queries with <a href="#item_get"><code>get()</code></a>
149 method and <a href="#item_set"><code>set()</code></a> method (which accept multiple arguments).</p>
151 </p>
152 <h2><a name="methods">Methods</a></h2>
153 <dl>
154 <dt><strong><a name="item_dumpvalue">dumpValue</a></strong>
156 <dd>
157 <pre>
158 $dumper-&gt;dumpValue($value);
159 $dumper-&gt;dumpValue([$value1, $value2]);</pre>
160 </dd>
161 <dd>
162 <p>Prints a dump to the currently selected filehandle.</p>
163 </dd>
164 <dt><strong><a name="item_dumpvalues">dumpValues</a></strong>
166 <dd>
167 <pre>
168 $dumper-&gt;dumpValues($value1, $value2);</pre>
169 </dd>
170 <dd>
171 <p>Same as <code> $dumper-</code>dumpValue([$value1, $value2]); &gt;.</p>
172 </dd>
173 <dt><strong><a name="item_stringify">stringify</a></strong>
175 <dd>
176 <pre>
177 my $dump = $dumper-&gt;stringify($value [,$noticks] );</pre>
178 </dd>
179 <dd>
180 <p>Returns the dump of a single scalar without printing. If the second
181 argument is true, the return value does not contain enclosing ticks.
182 Does not handle data structures.</p>
183 </dd>
184 <dt><strong><a name="item_dumpvars">dumpvars</a></strong>
186 <dd>
187 <pre>
188 $dumper-&gt;dumpvars('my_package');
189 $dumper-&gt;dumpvars('my_package', 'foo', '~bar$', '!......');</pre>
190 </dd>
191 <dd>
192 <p>The optional arguments are considered as literal strings unless they
193 start with <code>~</code> or <code>!</code>, in which case they are interpreted as regular
194 expressions (possibly negated).</p>
195 </dd>
196 <dd>
197 <p>The second example prints entries with names <code>foo</code>, and also entries
198 with names which ends on <code>bar</code>, or are shorter than 5 chars.</p>
199 </dd>
200 <dt><strong><a name="item_set_quote">set_quote</a></strong>
202 <dd>
203 <pre>
204 $d-&gt;set_quote('&quot;');</pre>
205 </dd>
206 <dd>
207 <p>Sets <code>tick</code> and <a href="#item_unctrl"><code>unctrl</code></a> options to suitable values for printout with the
208 given quote char. Possible values are <code>auto</code>, <code>'</code> and <code>&quot;</code>.</p>
209 </dd>
210 <dt><strong><a name="item_set_unctrl">set_unctrl</a></strong>
212 <dd>
213 <pre>
214 $d-&gt;set_unctrl('unctrl');</pre>
215 </dd>
216 <dd>
217 <p>Sets <a href="#item_unctrl"><code>unctrl</code></a> option with checking for an invalid argument.
218 Possible values are <a href="#item_unctrl"><code>unctrl</code></a> and <code>quote</code>.</p>
219 </dd>
220 <dt><strong><a name="item_compactdump">compactDump</a></strong>
222 <dd>
223 <pre>
224 $d-&gt;compactDump(1);</pre>
225 </dd>
226 <dd>
227 <p>Sets <a href="#item_compactdump"><code>compactDump</code></a> option. If the value is 1, sets to a reasonable
228 big number.</p>
229 </dd>
230 <dt><strong><a name="item_verycompact">veryCompact</a></strong>
232 <dd>
233 <pre>
234 $d-&gt;veryCompact(1);</pre>
235 </dd>
236 <dd>
237 <p>Sets <a href="#item_compactdump"><code>compactDump</code></a> and <a href="#item_verycompact"><code>veryCompact</code></a> options simultaneously.</p>
238 </dd>
239 <dt><strong><a name="item_set">set</a></strong>
241 <dd>
242 <pre>
243 $d-&gt;set(option1 =&gt; value1, option2 =&gt; value2);</pre>
244 </dd>
245 <dt><strong><a name="item_get">get</a></strong>
247 <dd>
248 <pre>
249 @values = $d-&gt;get('option1', 'option2');</pre>
250 </dd>
251 </dl>
252 <table border="0" width="100%" cellspacing="0" cellpadding="3">
253 <tr><td class="block" style="background-color: #cccccc" valign="middle">
254 <big><strong><span class="block">&nbsp;Dumpvalue - provides screen dump of Perl data.</span></strong></big>
255 </td></tr>
256 </table>
258 </body>
260 </html>