1Dumpvalue(3pm)         Perl Programmers Reference Guide         Dumpvalue(3pm)
2
3
4

NAME

6       Dumpvalue - provides screen dump of Perl data.
7

SYNOPSIS

9         use Dumpvalue;
10         my $dumper = new Dumpvalue;
11         $dumper->set(globPrint => 1);
12         $dumper->dumpValue(\*::);
13         $dumper->dumpvars('main');
14         my $dump = $dumper->stringify($some_value);
15

DESCRIPTION

17       Creation
18
19       A new dumper is created by a call
20
21         $d = new Dumpvalue(option1 => value1, option2 => value2)
22
23       Recognized options:
24
25       "arrayDepth", "hashDepth"
26           Print only first N elements of arrays and hashes.  If false, prints
27           all the elements.
28
29       "compactDump", "veryCompact"
30           Change style of array and hash dump.  If true, short array may be
31           printed on one line.
32
33       "globPrint"
34           Whether to print contents of globs.
35
36       "dumpDBFiles"
37           Dump arrays holding contents of debugged files.
38
39       "dumpPackages"
40           Dump symbol tables of packages.
41
42       "dumpReused"
43           Dump contents of "reused" addresses.
44
45       "tick", "quoteHighBit", "printUndef"
46           Change style of string dump.  Default value of "tick" is "auto",
47           one can enable either double-quotish dump, or single-quotish by
48           setting it to """ or "'".  By default, characters with high bit set
49           are printed as is.  If "quoteHighBit" is set, they will be quoted.
50
51       "usageOnly"
52           rudimentally per-package memory usage dump.  If set, "dumpvars"
53           calculates total size of strings in variables in the package.
54
55       unctrl
56           Changes the style of printout of strings.  Possible values are
57           "unctrl" and "quote".
58
59       subdump
60           Whether to try to find the subroutine name given the reference.
61
62       bareStringify
63           Whether to write the non-overloaded form of the stringify-over‐
64           loaded objects.
65
66       quoteHighBit
67           Whether to print chars with high bit set in binary or "as is".
68
69       stopDbSignal
70           Whether to abort printing if debugger signal flag is raised.
71
72       Later in the life of the object the methods may be queries with get()
73       method and set() method (which accept multiple arguments).
74
75       Methods
76
77       dumpValue
78             $dumper->dumpValue($value);
79             $dumper->dumpValue([$value1, $value2]);
80
81           Prints a dump to the currently selected filehandle.
82
83       dumpValues
84             $dumper->dumpValues($value1, $value2);
85
86           Same as " $dumper-"dumpValue([$value1, $value2]); >.
87
88       stringify
89             my $dump = $dumper->stringify($value [,$noticks] );
90
91           Returns the dump of a single scalar without printing. If the second
92           argument is true, the return value does not contain enclosing
93           ticks.  Does not handle data structures.
94
95       dumpvars
96             $dumper->dumpvars('my_package');
97             $dumper->dumpvars('my_package', 'foo', '~bar$', '!......');
98
99           The optional arguments are considered as literal strings unless
100           they start with "~" or "!", in which case they are interpreted as
101           regular expressions (possibly negated).
102
103           The second example prints entries with names "foo", and also
104           entries with names which ends on "bar", or are shorter than 5
105           chars.
106
107       set_quote
108             $d->set_quote('"');
109
110           Sets "tick" and "unctrl" options to suitable values for printout
111           with the given quote char.  Possible values are "auto", "'" and
112           """.
113
114       set_unctrl
115             $d->set_unctrl('unctrl');
116
117           Sets "unctrl" option with checking for an invalid argument.  Possi‐
118           ble values are "unctrl" and "quote".
119
120       compactDump
121             $d->compactDump(1);
122
123           Sets "compactDump" option.  If the value is 1, sets to a reasonable
124           big number.
125
126       veryCompact
127             $d->veryCompact(1);
128
129           Sets "compactDump" and "veryCompact" options simultaneously.
130
131       set
132             $d->set(option1 => value1, option2 => value2);
133
134       get
135             @values = $d->get('option1', 'option2');
136
137
138
139perl v5.8.8                       2001-09-21                    Dumpvalue(3pm)
Impressum