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">
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:" />
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"> Dumpvalue - provides screen dump of Perl data.
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#synopsis">SYNOPSIS
</a></li>
24 <li><a href=
"#description">DESCRIPTION
</a></li>
27 <li><a href=
"#creation">Creation
</a></li>
28 <li><a href=
"#methods">Methods
</a></li>
37 <h1><a name=
"name">NAME
</a></h1>
38 <p>Dumpvalue - provides screen dump of Perl data.
</p>
42 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
45 my $dumper = new Dumpvalue;
46 $dumper-
>set(globPrint =
> 1);
47 $dumper-
>dumpValue(\*::);
48 $dumper-
>dumpvars('main');
49 my $dump = $dumper-
>stringify($some_value);
</pre>
53 <h1><a name=
"description">DESCRIPTION
</a></h1>
56 <h2><a name=
"creation">Creation
</a></h2>
57 <p>A new dumper is created by a call
</p>
59 $d = new Dumpvalue(option1 =
> value1, option2 =
> value2)
</pre>
60 <p>Recognized options:
</p>
62 <dt><strong><a name=
"item_arraydepth_2c_hashdepth"><code>arrayDepth
</code>,
<code>hashDepth
</code></a></strong>
65 <p>Print only first N elements of arrays and hashes. If false, prints all the
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>
72 <p>Change style of array and hash dump. If true, short array
73 may be printed on one line.
</p>
76 <dt><strong><a name=
"item_globprint"><code>globPrint
</code></a></strong>
79 <p>Whether to print contents of globs.
</p>
82 <dt><strong><a name=
"item_dumpdbfiles"><code>dumpDBFiles
</code></a></strong>
85 <p>Dump arrays holding contents of debugged files.
</p>
88 <dt><strong><a name=
"item_dumppackages"><code>dumpPackages
</code></a></strong>
91 <p>Dump symbol tables of packages.
</p>
94 <dt><strong><a name=
"item_dumpreused"><code>dumpReused
</code></a></strong>
97 <p>Dump contents of ``reused'' addresses.
</p>
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>
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>"</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>
109 <dt><strong><a name=
"item_usageonly"><code>usageOnly
</code></a></strong>
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>
116 <dt><strong><a name=
"item_unctrl">unctrl
</a></strong>
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>
123 <dt><strong><a name=
"item_subdump">subdump
</a></strong>
126 <p>Whether to try to find the subroutine name given the reference.
</p>
129 <dt><strong><a name=
"item_barestringify">bareStringify
</a></strong>
132 <p>Whether to write the non-overloaded form of the stringify-overloaded objects.
</p>
135 <dt><strong><a name=
"item_quotehighbit">quoteHighBit
</a></strong>
138 <p>Whether to print chars with high bit set in binary or ``as is''.
</p>
141 <dt><strong><a name=
"item_stopdbsignal">stopDbSignal
</a></strong>
144 <p>Whether to abort printing if debugger signal flag is raised.
</p>
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>
152 <h2><a name=
"methods">Methods
</a></h2>
154 <dt><strong><a name=
"item_dumpvalue">dumpValue
</a></strong>
158 $dumper-
>dumpValue($value);
159 $dumper-
>dumpValue([$value1, $value2]);
</pre>
162 <p>Prints a dump to the currently selected filehandle.
</p>
164 <dt><strong><a name=
"item_dumpvalues">dumpValues
</a></strong>
168 $dumper-
>dumpValues($value1, $value2);
</pre>
171 <p>Same as
<code> $dumper-
</code>dumpValue([$value1, $value2]);
>.
</p>
173 <dt><strong><a name=
"item_stringify">stringify
</a></strong>
177 my $dump = $dumper-
>stringify($value [,$noticks] );
</pre>
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>
184 <dt><strong><a name=
"item_dumpvars">dumpvars
</a></strong>
188 $dumper-
>dumpvars('my_package');
189 $dumper-
>dumpvars('my_package', 'foo', '~bar$', '!......');
</pre>
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>
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>
200 <dt><strong><a name=
"item_set_quote">set_quote
</a></strong>
204 $d-
>set_quote('
"');
</pre>
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>"</code>.
</p>
210 <dt><strong><a name=
"item_set_unctrl">set_unctrl
</a></strong>
214 $d-
>set_unctrl('unctrl');
</pre>
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>
220 <dt><strong><a name=
"item_compactdump">compactDump
</a></strong>
224 $d-
>compactDump(
1);
</pre>
227 <p>Sets
<a href=
"#item_compactdump"><code>compactDump
</code></a> option. If the value is
1, sets to a reasonable
230 <dt><strong><a name=
"item_verycompact">veryCompact
</a></strong>
234 $d-
>veryCompact(
1);
</pre>
237 <p>Sets
<a href=
"#item_compactdump"><code>compactDump
</code></a> and
<a href=
"#item_verycompact"><code>veryCompact
</code></a> options simultaneously.
</p>
239 <dt><strong><a name=
"item_set">set
</a></strong>
243 $d-
>set(option1 =
> value1, option2 =
> value2);
</pre>
245 <dt><strong><a name=
"item_get">get
</a></strong>
249 @values = $d-
>get('option1', 'option2');
</pre>
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"> Dumpvalue - provides screen dump of Perl data.
</span></strong></big>