line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::TreeDumper::OO; |
2
|
|
|
|
|
|
|
$Data::TreeDumper::OO::VERSION = '0.10'; |
3
|
1
|
|
|
1
|
|
48343
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
99
|
|
6
|
1
|
|
|
1
|
|
8
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
140
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
11
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); |
12
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
13
|
|
|
|
|
|
|
our @EXPORT = qw(); |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
8
|
use Data::TreeDumper 0.24 ; |
|
1
|
|
|
|
|
20
|
|
|
1
|
|
|
|
|
1236
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------------------------- |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new |
20
|
|
|
|
|
|
|
{ |
21
|
1
|
|
|
1
|
0
|
138
|
my($class, %setup_data) = @_; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
34
|
return bless({%Data::TreeDumper::setup, %setup_data}, $class); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
27
|
|
|
|
|
|
|
sub Dump |
28
|
|
|
|
|
|
|
{ |
29
|
1
|
|
|
1
|
0
|
8
|
my($self, $structure_to_dump, $title, %overrides) = @_; |
30
|
|
|
|
|
|
|
|
31
|
1
|
50
|
|
|
|
4
|
$title = defined $title ? $title : '' ; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return |
34
|
|
|
|
|
|
|
( |
35
|
|
|
|
|
|
|
Data::TreeDumper::TreeDumper |
36
|
|
|
|
|
|
|
( |
37
|
|
|
|
|
|
|
$structure_to_dump |
38
|
|
|
|
|
|
|
, { |
39
|
|
|
|
|
|
|
TITLE => $title |
40
|
|
|
|
|
|
|
, FILTER => $self->{FILTER} |
41
|
|
|
|
|
|
|
, LEVEL_FILTERS => $self->{LEVEL_FILTERS} |
42
|
|
|
|
|
|
|
, START_LEVEL => $self->{START_LEVEL} |
43
|
|
|
|
|
|
|
, USE_ASCII => $self->{USE_ASCII} |
44
|
|
|
|
|
|
|
, MAX_DEPTH => $self->{MAX_DEPTH} |
45
|
|
|
|
|
|
|
, INDENTATION => $self->{INDENTATION} |
46
|
|
|
|
|
|
|
, VIRTUAL_WIDTH => $self->{VIRTUAL_WIDTH} |
47
|
|
|
|
|
|
|
, DISPLAY_OBJECT_TYPE => $self->{DISPLAY_OBJECT_TYPE} |
48
|
|
|
|
|
|
|
, DISPLAY_INHERITANCE => $self->{DISPLAY_INHERITANCE} |
49
|
|
|
|
|
|
|
, DISPLAY_AUTOLOAD => $self->{DISPLAY_AUTOLOAD} |
50
|
|
|
|
|
|
|
, DISPLAY_TIE => $self->{DISPLAY_TIE} |
51
|
|
|
|
|
|
|
, DISPLAY_ADDRESS => $self->{DISPLAY_ADDRESS} |
52
|
|
|
|
|
|
|
, DISPLAY_ROOT_ADDRESS => $self->{DISPLAY_ROOT_ADDRESS} |
53
|
|
|
|
|
|
|
, DISPLAY_PERL_ADDRESS => $self->{DISPLAY_PERL_ADDRESS} |
54
|
|
|
|
|
|
|
, DISPLAY_PERL_SIZE => $self->{DISPLAY_PERL_SIZE} |
55
|
|
|
|
|
|
|
, NUMBER_LEVELS => $self->{NUMBER_LEVELS} |
56
|
|
|
|
|
|
|
, COLOR_LEVELS => $self->{COLOR_LEVELS} |
57
|
|
|
|
|
|
|
, NO_OUTPUT => $self->{NO_OUTPUT} |
58
|
|
|
|
|
|
|
, RENDERER => $self->{RENDERER} |
59
|
|
|
|
|
|
|
, GLYPHS => $self->{GLYPHS} |
60
|
|
|
|
|
|
|
, NO_NO_ELEMENTS => $self->{NO_NO_ELEMENTS} |
61
|
|
|
|
|
|
|
, QUOTE_HASH_KEYS => $self->{QUOTE_HASH_KEYS} |
62
|
|
|
|
|
|
|
, QUOTE_VALUES => $self->{QUOTE_VALUES} |
63
|
|
|
|
|
|
|
, REPLACEMENT_LIST => $self->{REPLACEMENT_LIST} |
64
|
|
|
|
|
|
|
, DISPLAY_PATH => $self->{DISPLAY_PATH} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
, __DATA_PATH => $self->{__DATA_PATH} |
67
|
|
|
|
|
|
|
, __TYPE_SEPARATORS => $self->{__TYPE_SEPARATORS} |
68
|
|
|
|
|
|
|
|
69
|
1
|
|
|
|
|
24
|
, %overrides |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
) |
72
|
|
|
|
|
|
|
) ; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub DumpMany |
78
|
|
|
|
|
|
|
{ |
79
|
0
|
|
|
0
|
0
|
0
|
my $self = shift ; |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
0
|
my @trees = grep {'ARRAY' eq ref $_} @_ ; |
|
0
|
|
|
|
|
0
|
|
82
|
0
|
|
|
|
|
0
|
my %global_override = grep {'ARRAY' ne ref $_} @_ ; |
|
0
|
|
|
|
|
0
|
|
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
0
|
my $dump = '' ; |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
0
|
for my $tree (@trees) |
87
|
|
|
|
|
|
|
{ |
88
|
0
|
|
|
|
|
0
|
my ($structure_to_dump, $title, %override) = @{$tree} ; |
|
0
|
|
|
|
|
0
|
|
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
0
|
$dump .= $self->Dump($structure_to_dump, $title, %global_override, %override) ; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
0
|
return($dump) ; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
97
|
|
|
|
|
|
|
sub SetFilter |
98
|
|
|
|
|
|
|
{ |
99
|
0
|
|
|
0
|
0
|
0
|
my($self, $filter) = @_; |
100
|
|
|
|
|
|
|
|
101
|
0
|
0
|
|
|
|
0
|
croak "Filter must be a code reference!" unless ('CODE' eq ref $filter) ; |
102
|
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
0
|
$self->{FILTER} = $filter ; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
107
|
|
|
|
|
|
|
sub SetLevelFilters |
108
|
|
|
|
|
|
|
{ |
109
|
0
|
|
|
0
|
0
|
0
|
my($self, $filters) = @_; |
110
|
|
|
|
|
|
|
|
111
|
0
|
0
|
|
|
|
0
|
croak "Filter must be an array reference!" unless ('ARRAY' eq ref $filters) ; |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
0
|
$self->{LEVEL_FILTERS} = $filters ; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
117
|
|
|
|
|
|
|
sub SetStartLevel |
118
|
|
|
|
|
|
|
{ |
119
|
0
|
|
|
0
|
0
|
0
|
my($self, $start_level) = @_ ; |
120
|
0
|
|
|
|
|
0
|
$self->{START_LEVEL} = $start_level; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
124
|
|
|
|
|
|
|
sub NoOutput |
125
|
|
|
|
|
|
|
{ |
126
|
0
|
|
|
0
|
0
|
0
|
my($self, $no_output) = @_ ; |
127
|
0
|
|
|
|
|
0
|
$self->{NO_OUTPUT} = $no_output ; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
131
|
|
|
|
|
|
|
sub UseAscii |
132
|
|
|
|
|
|
|
{ |
133
|
0
|
|
|
0
|
0
|
0
|
my($self, $use_ascii) = @_ ; |
134
|
0
|
|
|
|
|
0
|
$self->{USE_ASCII} = $use_ascii ; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
138
|
|
|
|
|
|
|
sub UseAnsi |
139
|
|
|
|
|
|
|
{ |
140
|
1
|
|
|
1
|
0
|
8
|
my($self, $use_ansi) = @_ ; |
141
|
1
|
|
|
|
|
11
|
$self->{USE_ASCII} = (!$use_ansi) ; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
145
|
|
|
|
|
|
|
sub SetMaxDepth |
146
|
|
|
|
|
|
|
{ |
147
|
1
|
|
|
1
|
0
|
7
|
my($self, $max_depth) = @_ ; |
148
|
1
|
|
|
|
|
3
|
$self->{MAX_DEPTH} = $max_depth ; |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
152
|
|
|
|
|
|
|
sub SetIndentation |
153
|
|
|
|
|
|
|
{ |
154
|
0
|
|
|
0
|
0
|
|
my($self, $indentation) = @_ ; |
155
|
0
|
|
|
|
|
|
$self->{INDENTATION} = $indentation ; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
159
|
|
|
|
|
|
|
sub ReplacementList |
160
|
|
|
|
|
|
|
{ |
161
|
0
|
|
|
0
|
0
|
|
my($self, $replacement) = @_ ; |
162
|
0
|
|
|
|
|
|
$self->{REPLACEMENT_LIST} = $replacement ; |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
166
|
|
|
|
|
|
|
sub QuoteHashKeys |
167
|
|
|
|
|
|
|
{ |
168
|
0
|
|
|
0
|
0
|
|
my($self, $quote) = @_ ; |
169
|
0
|
|
|
|
|
|
$self->{QUOTE_HASH_KEYS} = $quote ; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
173
|
|
|
|
|
|
|
sub QuoteValues |
174
|
|
|
|
|
|
|
{ |
175
|
0
|
|
|
0
|
0
|
|
my($self, $quote) = @_ ; |
176
|
0
|
|
|
|
|
|
$self->{QUOTE_VALUES} = $quote ; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
180
|
|
|
|
|
|
|
sub DisplayNoElements |
181
|
|
|
|
|
|
|
{ |
182
|
0
|
|
|
0
|
0
|
|
my($self, $no_no_elements) = @_ ; |
183
|
0
|
|
|
|
|
|
$self->{NO_NO_ELEMENTS} = ! $no_no_elements; |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
187
|
|
|
|
|
|
|
sub SetVirtualWidth |
188
|
|
|
|
|
|
|
{ |
189
|
0
|
|
|
0
|
0
|
|
my($self, $width) = @_ ; |
190
|
0
|
|
|
|
|
|
$self->{VIRTUAL_WIDTH} = $width ; |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
194
|
|
|
|
|
|
|
sub DisplayRootAddress |
195
|
|
|
|
|
|
|
{ |
196
|
0
|
|
|
0
|
0
|
|
my($self, $display_root_address) = @_ ; |
197
|
0
|
|
|
|
|
|
$self->{DISPLAY_ROOT_ADDRESS} = $display_root_address ; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
201
|
|
|
|
|
|
|
sub DisplayAddress |
202
|
|
|
|
|
|
|
{ |
203
|
0
|
|
|
0
|
0
|
|
my($self, $display_address) = @_ ; |
204
|
0
|
|
|
|
|
|
$self->{DISPLAY_ADDRESS} = $display_address ; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
208
|
|
|
|
|
|
|
sub DisplayPath |
209
|
|
|
|
|
|
|
{ |
210
|
0
|
|
|
0
|
0
|
|
my($self, $display_path) = @_ ; |
211
|
0
|
|
|
|
|
|
$self->{DISPLAY_PATH} = $display_path; |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
215
|
|
|
|
|
|
|
sub DisplayObjectType |
216
|
|
|
|
|
|
|
{ |
217
|
0
|
|
|
0
|
0
|
|
my($self, $display_object_type) = @_ ; |
218
|
0
|
|
|
|
|
|
$self->{DISPLAY_OBJECT_TYPE} = $display_object_type ; |
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
222
|
|
|
|
|
|
|
sub DisplayInheritance |
223
|
|
|
|
|
|
|
{ |
224
|
0
|
|
|
0
|
0
|
|
my($self, $display_inheritance) = @_ ; |
225
|
0
|
|
|
|
|
|
$self->{DISPLAY_INHERITANCE} = $display_inheritance ; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
229
|
|
|
|
|
|
|
sub DisplayAutoload |
230
|
|
|
|
|
|
|
{ |
231
|
0
|
|
|
0
|
0
|
|
my($self, $display_autoload) = @_ ; |
232
|
0
|
|
|
|
|
|
$self->{DISPLAY_AUTOLOAD} = $display_autoload ; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
236
|
|
|
|
|
|
|
sub Displaytie |
237
|
|
|
|
|
|
|
{ |
238
|
0
|
|
|
0
|
0
|
|
my($self, $display_tie) = @_ ; |
239
|
0
|
|
|
|
|
|
$self->{DISPLAY_TIE} = $display_tie ; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
243
|
|
|
|
|
|
|
sub DisplayPerlSize |
244
|
|
|
|
|
|
|
{ |
245
|
0
|
|
|
0
|
0
|
|
my($self, $display_perl_size) = @_ ; |
246
|
0
|
|
|
|
|
|
$self->{DISPLAY_PERL_SIZE} = $display_perl_size; |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
250
|
|
|
|
|
|
|
sub DisplayPerlAddress |
251
|
|
|
|
|
|
|
{ |
252
|
0
|
|
|
0
|
0
|
|
my($self, $display_perl_address) = @_ ; |
253
|
0
|
|
|
|
|
|
$self->{DISPLAY_PERL_ADDRESS} = $display_perl_address ; |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
257
|
|
|
|
|
|
|
sub NumberLevels |
258
|
|
|
|
|
|
|
{ |
259
|
0
|
|
|
0
|
0
|
|
my($self, $number_levels) = @_ ; |
260
|
0
|
|
|
|
|
|
$self->{NUMBER_LEVELS} = $number_levels; |
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
264
|
|
|
|
|
|
|
sub ColorLevels |
265
|
|
|
|
|
|
|
{ |
266
|
0
|
|
|
0
|
0
|
|
my($self, $color_levels) = @_ ; |
267
|
0
|
|
|
|
|
|
$self->{COLOR_LEVELS} = $color_levels ; |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
271
|
|
|
|
|
|
|
sub SetGlyphs |
272
|
|
|
|
|
|
|
{ |
273
|
0
|
|
|
0
|
0
|
|
my($self, $glyphs) = @_ ; |
274
|
0
|
|
|
|
|
|
$self->{GLYPHS} = $glyphs ; |
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
278
|
|
|
|
|
|
|
sub SetRenderer |
279
|
|
|
|
|
|
|
{ |
280
|
0
|
|
|
0
|
0
|
|
my($self, $renderer) = @_ ; |
281
|
0
|
|
|
|
|
|
$self->{RENDERER} = $renderer ; |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------ |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
1 ; |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
__END__ |