|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
  
 
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # Data/Dumper.pm  | 
| 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # convert perl data structures into perl syntax suitable for both printing  | 
| 
5
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # and eval  | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # Documentation at the __END__  | 
| 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Data::Dumper;  | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
12
 | 
27
 | 
 
 | 
 
 | 
  
27
  
 | 
 
 | 
586181
 | 
 use strict;  | 
| 
 
 | 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
214
 | 
    | 
| 
 
 | 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1285
 | 
    | 
| 
13
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
 
 | 
132
 | 
 use warnings;  | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
44
 | 
    | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
688
 | 
    | 
| 
14
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #$| = 1;  | 
| 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
17
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
 
 | 
572
 | 
 use 5.008_001;  | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
88
 | 
    | 
| 
18
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 require Exporter;  | 
| 
19
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
20
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
 
 | 
196
 | 
 use constant IS_PRE_516_PERL => $] < 5.016;  | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
63
 | 
    | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3018
 | 
    | 
| 
21
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
22
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
 
 | 
177
 | 
 use Carp ();  | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
56
 | 
    | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
6383
 | 
    | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # Globals people alter.  | 
| 
25
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our ( $Indent, $Trailingcomma, $Purity, $Pad, $Varname, $Useqq, $Terse, $Freezer,  | 
| 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $Toaster, $Deepcopy, $Quotekeys, $Bless, $Maxdepth, $Pair, $Sortkeys,  | 
| 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $Deparse, $Sparseseen, $Maxrecurse, $Useperl );  | 
| 
28
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
29
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our ( @ISA, @EXPORT, @EXPORT_OK, $VERSION );  | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
31
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 BEGIN {  | 
| 
32
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
 
 | 
102
 | 
     $VERSION = '2.182_51'; # Don't forget to set version and release  | 
| 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                         # date in POD below!  | 
| 
34
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
35
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
470
 | 
     @ISA = qw(Exporter);  | 
| 
36
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
117
 | 
     @EXPORT = qw(Dumper);  | 
| 
37
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
49
 | 
     @EXPORT_OK = qw(DumperX);  | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
39
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # if run under miniperl, or otherwise lacking dynamic loading,  | 
| 
40
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # XSLoader should be attempted to load, or the pure perl flag  | 
| 
41
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # toggled on load failure.  | 
| 
42
 | 
26
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
64
 | 
     eval {  | 
| 
43
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
156
 | 
         require XSLoader;  | 
| 
44
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
12869
 | 
         XSLoader::load( 'Data::Dumper' );  | 
| 
45
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
36948
 | 
         1  | 
| 
46
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
47
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     or $Useperl = 1;  | 
| 
48
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
49
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
50
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 my $IS_ASCII  = ord 'A' ==  65;  | 
| 
51
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
52
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # module vars and their defaults  | 
| 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Indent     = 2         unless defined $Indent;  | 
| 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Trailingcomma = 0      unless defined $Trailingcomma;  | 
| 
55
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Purity     = 0         unless defined $Purity;  | 
| 
56
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Pad        = ""        unless defined $Pad;  | 
| 
57
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Varname    = "VAR"     unless defined $Varname;  | 
| 
58
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Useqq      = 0         unless defined $Useqq;  | 
| 
59
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Terse      = 0         unless defined $Terse;  | 
| 
60
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Freezer    = ""        unless defined $Freezer;  | 
| 
61
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Toaster    = ""        unless defined $Toaster;  | 
| 
62
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Deepcopy   = 0         unless defined $Deepcopy;  | 
| 
63
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Quotekeys  = 1         unless defined $Quotekeys;  | 
| 
64
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Bless      = "bless"   unless defined $Bless;  | 
| 
65
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #$Expdepth   = 0         unless defined $Expdepth;  | 
| 
66
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Maxdepth   = 0         unless defined $Maxdepth;  | 
| 
67
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Pair       = ' => '    unless defined $Pair;  | 
| 
68
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Useperl    = 0         unless defined $Useperl;  | 
| 
69
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Sortkeys   = 0         unless defined $Sortkeys;  | 
| 
70
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Deparse    = 0         unless defined $Deparse;  | 
| 
71
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Sparseseen = 0         unless defined $Sparseseen;  | 
| 
72
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Maxrecurse = 1000      unless defined $Maxrecurse;  | 
| 
73
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
75
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # expects an arrayref of values to be dumped.  | 
| 
76
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # can optionally pass an arrayref of names for the values.  | 
| 
77
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # names must have leading $ sign stripped. begin the name with *  | 
| 
78
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # to cause output of arrays and hashes rather than refs.  | 
| 
79
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
80
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub new {  | 
| 
81
 | 
637
 | 
 
 | 
 
 | 
  
637
  
 | 
  
1
  
 | 
299791
 | 
   my($c, $v, $n) = @_;  | 
| 
82
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
83
 | 
637
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
3645
 | 
   Carp::croak("Usage:  PACKAGE->new(ARRAYREF, [ARRAYREF])")  | 
| 
84
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     unless (defined($v) && (ref($v) eq 'ARRAY'));  | 
| 
85
 | 
635
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1952
 | 
   $n = [] unless (defined($n) && (ref($n) eq 'ARRAY'));  | 
| 
86
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
87
 | 
635
 | 
 
 | 
 
 | 
 
 | 
 
 | 
7641
 | 
   my($s) = {  | 
| 
88
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         level      => 0,           # current recursive depth  | 
| 
89
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         indent     => $Indent,     # various styles of indenting  | 
| 
90
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         trailingcomma => $Trailingcomma, # whether to add comma after last elem  | 
| 
91
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         pad        => $Pad,        # all lines prefixed by this string  | 
| 
92
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         xpad       => "",          # padding-per-level  | 
| 
93
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         apad       => "",          # added padding for hash keys n such  | 
| 
94
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         sep        => "",          # list separator  | 
| 
95
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         pair       => $Pair,    # hash key/value separator: defaults to ' => '  | 
| 
96
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         seen       => {},          # local (nested) refs (id => [name, val])  | 
| 
97
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         todump     => $v,          # values to dump []  | 
| 
98
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         names      => $n,          # optional names for values []  | 
| 
99
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         varname    => $Varname,    # prefix to use for tagging nameless ones  | 
| 
100
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         purity     => $Purity,     # degree to which output is evalable  | 
| 
101
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         useqq      => $Useqq,      # use "" for strings (backslashitis ensues)  | 
| 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         terse      => $Terse,      # avoid name output (where feasible)  | 
| 
103
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         freezer    => $Freezer,    # name of Freezer method for objects  | 
| 
104
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         toaster    => $Toaster,    # name of method to revive objects  | 
| 
105
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         deepcopy   => $Deepcopy,   # do not cross-ref, except to stop recursion  | 
| 
106
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         quotekeys  => $Quotekeys,  # quote hash keys  | 
| 
107
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         'bless'    => $Bless,    # keyword to use for "bless"  | 
| 
108
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #        expdepth   => $Expdepth,   # cutoff depth for explicit dumping  | 
| 
109
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         maxdepth   => $Maxdepth,   # depth beyond which we give up  | 
| 
110
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	maxrecurse => $Maxrecurse, # depth beyond which we abort  | 
| 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         useperl    => $Useperl,    # use the pure Perl implementation  | 
| 
112
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         sortkeys   => $Sortkeys,   # flag or filter for sorting hash keys  | 
| 
113
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         deparse    => $Deparse,    # use B::Deparse for coderefs  | 
| 
114
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         noseen     => $Sparseseen, # do not populate the seen hash unless necessary  | 
| 
115
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
        };  | 
| 
116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
117
 | 
635
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1668
 | 
   if ($Indent > 0) {  | 
| 
118
 | 
597
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1200
 | 
     $s->{xpad} = "  ";  | 
| 
119
 | 
597
 | 
 
 | 
 
 | 
 
 | 
 
 | 
906
 | 
     $s->{sep} = "\n";  | 
| 
120
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
121
 | 
635
 | 
 
 | 
 
 | 
 
 | 
 
 | 
10966
 | 
   return bless($s, $c);  | 
| 
122
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
123
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
124
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # Packed numeric addresses take less memory. Plus pack is faster than sprintf  | 
| 
125
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
126
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub format_refaddr {  | 
| 
127
 | 
2009
 | 
 
 | 
 
 | 
  
2009
  
 | 
  
0
  
 | 
6657
 | 
     require Scalar::Util;  | 
| 
128
 | 
2009
 | 
 
 | 
 
 | 
 
 | 
 
 | 
6289
 | 
     pack "J", Scalar::Util::refaddr(shift);  | 
| 
129
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 };  | 
| 
130
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
131
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
132
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # add-to or query the table of already seen references  | 
| 
133
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
134
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub Seen {  | 
| 
135
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
  
1
  
 | 
112
 | 
   my($s, $g) = @_;  | 
| 
136
 | 
26
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
109
 | 
   if (defined($g) && (ref($g) eq 'HASH'))  {  | 
| 
137
 | 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
34
 | 
     my($k, $v, $id);  | 
| 
138
 | 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
99
 | 
     while (($k, $v) = each %$g) {  | 
| 
139
 | 
24
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
51
 | 
       if (defined $v) {  | 
| 
140
 | 
23
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
51
 | 
         if (ref $v) {  | 
| 
141
 | 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
40
 | 
           $id = format_refaddr($v);  | 
| 
142
 | 
22
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
107
 | 
           if ($k =~ /^[*](.*)$/) {  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
143
 | 
16
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
80
 | 
             $k = (ref $v eq 'ARRAY') ? ( "\\\@" . $1 ) :  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
144
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                  (ref $v eq 'HASH')  ? ( "\\\%" . $1 ) :  | 
| 
145
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                  (ref $v eq 'CODE')  ? ( "\\\&" . $1 ) :  | 
| 
146
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                  (   "\$" . $1 ) ;  | 
| 
147
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           }  | 
| 
148
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           elsif ($k !~ /^\$/) {  | 
| 
149
 | 
5
 | 
 
 | 
 
 | 
 
 | 
 
 | 
14
 | 
             $k = "\$" . $k;  | 
| 
150
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           }  | 
| 
151
 | 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
130
 | 
           $s->{seen}{$id} = [$k, $v];  | 
| 
152
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
153
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         else {  | 
| 
154
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
215
 | 
           Carp::carp("Only refs supported, ignoring non-ref item \$$k");  | 
| 
155
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
156
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
157
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       else {  | 
| 
158
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
90
 | 
         Carp::carp("Value of ref must be defined; ignoring undefined item \$$k");  | 
| 
159
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
160
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
161
 | 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
473
 | 
     return $s;  | 
| 
162
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
163
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   else {  | 
| 
164
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3
 | 
     return map { @$_ } values %{$s->{seen}};  | 
| 
 
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
17
 | 
    | 
| 
165
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
166
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
167
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
168
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
169
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # set or query the values to be dumped  | 
| 
170
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
171
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub Values {  | 
| 
172
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
1
  
 | 
1036
 | 
   my($s, $v) = @_;  | 
| 
173
 | 
6
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
14
 | 
   if (defined($v)) {  | 
| 
174
 | 
2
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
6
 | 
     if (ref($v) eq 'ARRAY')  {  | 
| 
175
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3
 | 
       $s->{todump} = [@$v];        # make a copy  | 
| 
176
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3
 | 
       return $s;  | 
| 
177
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
178
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     else {  | 
| 
179
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
177
 | 
       Carp::croak("Argument to Values, if provided, must be array ref");  | 
| 
180
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
181
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
182
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   else {  | 
| 
183
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
6
 | 
     return @{$s->{todump}};  | 
| 
 
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
26
 | 
    | 
| 
184
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
185
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
186
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
187
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
188
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # set or query the names of the values to be dumped  | 
| 
189
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
190
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub Names {  | 
| 
191
 | 
5
 | 
 
 | 
 
 | 
  
5
  
 | 
  
1
  
 | 
1305
 | 
   my($s, $n) = @_;  | 
| 
192
 | 
5
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
16
 | 
   if (defined($n)) {  | 
| 
193
 | 
4
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
14
 | 
     if (ref($n) eq 'ARRAY') {  | 
| 
194
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
12
 | 
       $s->{names} = [@$n];         # make a copy  | 
| 
195
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
21
 | 
       return $s;  | 
| 
196
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
197
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     else {  | 
| 
198
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
271
 | 
       Carp::croak("Argument to Names, if provided, must be array ref");  | 
| 
199
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
200
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
201
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   else {  | 
| 
202
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2
 | 
     return @{$s->{names}};  | 
| 
 
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
11
 | 
    | 
| 
203
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
204
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
206
 | 
 
 | 
 
 | 
 
 | 
  
0
  
 | 
 
 | 
 
 | 
 sub DESTROY {}  | 
| 
207
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
208
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub Dump {  | 
| 
209
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return &Dumpxs  | 
| 
210
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     unless $Data::Dumper::Useperl || (ref($_[0]) && $_[0]->{useperl})  | 
| 
211
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             # Use pure perl version on earlier releases on EBCDIC platforms  | 
| 
212
 | 
463
 | 
  
 50
  
 | 
  
100
  
 | 
  
463
  
 | 
  
1
  
 | 
80714
 | 
         || (! $IS_ASCII && $] lt 5.021_010);  | 
| 
 
 | 
2
 | 
 
 | 
  
100
  
 | 
  
2
  
 | 
 
 | 
16
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
  
 33
  
 | 
 
 | 
 
 | 
5
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
  
 66
  
 | 
 
 | 
 
 | 
2117
 | 
    | 
| 
213
 | 
287
 | 
 
 | 
 
 | 
 
 | 
 
 | 
596
 | 
   return &Dumpperl;  | 
| 
214
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
215
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
216
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
217
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # dump the refs in the current dumper object.  | 
| 
218
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # expects same args as new() if called via package name.  | 
| 
219
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
220
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our @post;  | 
| 
221
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub Dumpperl {  | 
| 
222
 | 
287
 | 
 
 | 
 
 | 
  
287
  
 | 
  
0
  
 | 
546
 | 
   my($s) = shift;  | 
| 
223
 | 
287
 | 
 
 | 
 
 | 
 
 | 
 
 | 
463
 | 
   my(@out, $val, $name);  | 
| 
224
 | 
287
 | 
 
 | 
 
 | 
 
 | 
 
 | 
433
 | 
   my($i) = 0;  | 
| 
225
 | 
287
 | 
 
 | 
 
 | 
 
 | 
 
 | 
536
 | 
   local(@post);  | 
| 
226
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
227
 | 
287
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
824
 | 
   $s = $s->new(@_) unless ref $s;  | 
| 
228
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
229
 | 
287
 | 
 
 | 
 
 | 
 
 | 
 
 | 
448
 | 
   for $val (@{$s->{todump}}) {  | 
| 
 
 | 
287
 | 
 
 | 
 
 | 
 
 | 
 
 | 
784
 | 
    | 
| 
230
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1607
 | 
     @post = ();  | 
| 
231
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1719
 | 
     $name = $s->{names}[$i++];  | 
| 
232
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1809
 | 
     $name = $s->_refine_name($name, $val, $i);  | 
| 
233
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
234
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1402
 | 
     my $valstr;  | 
| 
235
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
236
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1214
 | 
       local($s->{apad}) = $s->{apad};  | 
| 
 
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2116
 | 
    | 
| 
237
 | 
981
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
2455
 | 
       $s->{apad} .= ' ' x (length($name) + 3) if $s->{indent} >= 2 and !$s->{terse};  | 
| 
238
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1809
 | 
       $valstr = $s->_dump($val, $name);  | 
| 
239
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
240
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
241
 | 
976
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
4133
 | 
     $valstr = "$name = " . $valstr . ';' if @post or !$s->{terse};  | 
| 
242
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2412
 | 
     my $out = $s->_compose_out($valstr, \@post);  | 
| 
243
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
244
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2129
 | 
     push @out, $out;  | 
| 
245
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
246
 | 
282
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
4528
 | 
   return wantarray ? @out : join('', @out);  | 
| 
247
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
248
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
249
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # wrap string in single quotes (escaping if needed)  | 
| 
250
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub _quote {  | 
| 
251
 | 
1106
 | 
 
 | 
 
 | 
  
1106
  
 | 
 
 | 
1600
 | 
     my $val = shift;  | 
| 
252
 | 
1106
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2007
 | 
     $val =~ s/([\\\'])/\\$1/g;  | 
| 
253
 | 
1106
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3016
 | 
     return  "'" . $val .  "'";  | 
| 
254
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
255
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
256
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # Old Perls (5.14-) have trouble resetting vstring magic when it is no  | 
| 
257
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # longer valid.  | 
| 
258
 | 
26
 | 
 
 | 
  
 33
  
 | 
  
26
  
 | 
 
 | 
266
 | 
 use constant _bad_vsmg => defined &_vstring && (_vstring(~v0)||'') eq "v0";  | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
77
 | 
    | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
98923
 | 
    | 
| 
259
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
260
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
261
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # twist, toil and turn;  | 
| 
262
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # and recurse, of course.  | 
| 
263
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # sometimes sordidly;  | 
| 
264
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # and curse if no recourse.  | 
| 
265
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
266
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub _dump {  | 
| 
267
 | 
2539
 | 
 
 | 
 
 | 
  
2539
  
 | 
 
 | 
4599
 | 
   my($s, $val, $name) = @_;  | 
| 
268
 | 
2539
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3422
 | 
   my($out, $type, $id, $sname);  | 
| 
269
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
270
 | 
2539
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3568
 | 
   $type = ref $val;  | 
| 
271
 | 
2539
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3306
 | 
   $out = "";  | 
| 
272
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
273
 | 
2539
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3987
 | 
   if ($type) {  | 
| 
274
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
275
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # Call the freezer method if it's specified and the object has the  | 
| 
276
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # method.  Trap errors and warn() instead of die()ing, like the XS  | 
| 
277
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # implementation.  | 
| 
278
 | 
788
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1120
 | 
     my $freezer = $s->{freezer};  | 
| 
279
 | 
788
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1556
 | 
     if ($freezer and UNIVERSAL::can($val, $freezer)) {  | 
| 
280
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
6
 | 
       eval { $val->$freezer() };  | 
| 
 
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
9
 | 
    | 
| 
281
 | 
3
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
33
 | 
       warn "WARNING(Freezer method call failed): $@" if $@;  | 
| 
282
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
283
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
284
 | 
788
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3473
 | 
     require Scalar::Util;  | 
| 
285
 | 
788
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1766
 | 
     my $realpack = Scalar::Util::blessed($val);  | 
| 
286
 | 
788
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1553
 | 
     my $realtype = $realpack ? Scalar::Util::reftype($val) : ref $val;  | 
| 
287
 | 
788
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1360
 | 
     $id = format_refaddr($val);  | 
| 
288
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
289
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # Note: By this point $name is always defined and of non-zero length.  | 
| 
290
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # Keep a tab on it so that we do not fall into recursive pit.  | 
| 
291
 | 
788
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1689
 | 
     if (exists $s->{seen}{$id}) {  | 
| 
292
 | 
232
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
713
 | 
       if ($s->{purity} and $s->{level} > 0) {  | 
| 
293
 | 
76
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
170
 | 
         $out = ($realtype eq 'HASH')  ? '{}' :  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
294
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                ($realtype eq 'ARRAY') ? '[]' :  | 
| 
295
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                'do{my $o}' ;  | 
| 
296
 | 
76
 | 
 
 | 
 
 | 
 
 | 
 
 | 
223
 | 
         push @post, $name . " = " . $s->{seen}{$id}[0];  | 
| 
297
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
298
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       else {  | 
| 
299
 | 
156
 | 
 
 | 
 
 | 
 
 | 
 
 | 
301
 | 
         $out = $s->{seen}{$id}[0];  | 
| 
300
 | 
156
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
451
 | 
         if ($name =~ /^([\@\%])/) {  | 
| 
301
 | 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
59
 | 
           my $start = $1;  | 
| 
302
 | 
30
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
198
 | 
           if ($out =~ /^\\$start/) {  | 
| 
303
 | 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
28
 | 
             $out = substr($out, 1);  | 
| 
304
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           }  | 
| 
305
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           else {  | 
| 
306
 | 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
53
 | 
             $out = $start . '{' . $out . '}';  | 
| 
307
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           }  | 
| 
308
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
309
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
310
 | 
232
 | 
 
 | 
 
 | 
 
 | 
 
 | 
742
 | 
       return $out;  | 
| 
311
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
312
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     else {  | 
| 
313
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       # store our name  | 
| 
314
 | 
556
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
3182
 | 
       $s->{seen}{$id} = [ (  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
315
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           ($name =~ /^[@%]/)  | 
| 
316
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             ? ('\\' . $name )  | 
| 
317
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             : ($realtype eq 'CODE' and $name =~ /^[*](.*)$/)  | 
| 
318
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
               ? ('\\&' . $1 )  | 
| 
319
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
               : $name  | 
| 
320
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         ), $val ];  | 
| 
321
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
322
 | 
556
 | 
 
 | 
 
 | 
 
 | 
 
 | 
934
 | 
     my $no_bless = 0;  | 
| 
323
 | 
556
 | 
 
 | 
 
 | 
 
 | 
 
 | 
737
 | 
     my $is_regex = 0;  | 
| 
324
 | 
556
 | 
  
 50
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1229
 | 
     if ( $realpack and ($] >= 5.009005 ? re::is_regexp($val) : $realpack eq 'Regexp') ) {  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
325
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
75
 | 
         $is_regex = 1;  | 
| 
326
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
91
 | 
         $no_bless = $realpack eq 'Regexp';  | 
| 
327
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
328
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
329
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # If purity is not set and maxdepth is set, then check depth:  | 
| 
330
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # if we have reached maximum depth, return the string  | 
| 
331
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # representation of the thing we are currently examining  | 
| 
332
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # at this depth (i.e., 'Foo=ARRAY(0xdeadbeef)').  | 
| 
333
 | 
556
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
2410
 | 
     if (!$s->{purity}  | 
| 
 
 | 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
334
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       and defined($s->{maxdepth})  | 
| 
335
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       and $s->{maxdepth} > 0  | 
| 
336
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       and $s->{level} >= $s->{maxdepth})  | 
| 
337
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
338
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
42
 | 
       return qq['$val'];  | 
| 
339
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
340
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
341
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # avoid recursing infinitely [perl #122111]  | 
| 
342
 | 
547
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1892
 | 
     if ($s->{maxrecurse} > 0  | 
| 
343
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         and $s->{level} >= $s->{maxrecurse}) {  | 
| 
344
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
79
 | 
         die "Recursion limit of $s->{maxrecurse} exceeded";  | 
| 
345
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
346
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
347
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # we have a blessed ref  | 
| 
348
 | 
543
 | 
 
 | 
 
 | 
 
 | 
 
 | 
751
 | 
     my ($blesspad);  | 
| 
349
 | 
543
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1106
 | 
     if ($realpack and !$no_bless) {  | 
| 
350
 | 
14
 | 
 
 | 
 
 | 
 
 | 
 
 | 
32
 | 
       $out = $s->{'bless'} . '( ';  | 
| 
351
 | 
14
 | 
 
 | 
 
 | 
 
 | 
 
 | 
33
 | 
       $blesspad = $s->{apad};  | 
| 
352
 | 
14
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
42
 | 
       $s->{apad} .= '       ' if ($s->{indent} >= 2);  | 
| 
353
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
354
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
355
 | 
543
 | 
 
 | 
 
 | 
 
 | 
 
 | 
754
 | 
     $s->{level}++;  | 
| 
356
 | 
543
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1154
 | 
     my $ipad = $s->{xpad} x $s->{level};  | 
| 
357
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
358
 | 
543
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
2857
 | 
     if ($is_regex) {  | 
| 
 
 | 
 
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
359
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
62
 | 
         my $pat;  | 
| 
360
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
89
 | 
         my $flags = "";  | 
| 
361
 | 
54
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
126
 | 
         if (defined(*re::regexp_pattern{CODE})) {  | 
| 
362
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
187
 | 
           ($pat, $flags) = re::regexp_pattern($val);  | 
| 
363
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
364
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         else {  | 
| 
365
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
           $pat = "$val";  | 
| 
366
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
367
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
217
 | 
         $pat =~ s <  | 
| 
368
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                      (\\.)           # anything backslash escaped  | 
| 
369
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    | (\$)(?![)|]|\z) # any unescaped $, except $| $) and end  | 
| 
370
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    | /               # any unescaped /  | 
| 
371
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                   >  | 
| 
372
 | 
67
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
280
 | 
                   {  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
373
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                       $1 ? $1  | 
| 
374
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                           : $2 ? '${\q($)}'  | 
| 
375
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                           : '\\/'  | 
| 
376
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
160
 | 
                   }gex;  | 
| 
377
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= "qr/$pat/$flags";  | 
| 
378
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
379
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif ($realtype eq 'SCALAR' || $realtype eq 'REF'  | 
| 
380
 | 
78
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
119
 | 
     || $realtype eq 'VSTRING') {  | 
| 
381
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
       if ($realpack) {  | 
| 
382
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= 'do{\\(my $o = ' . $s->_dump($$val, "\${$name}") . ')}';  | 
| 
383
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
384
 | 
78
 | 
 
 | 
 
 | 
 
 | 
 
 | 
345
 | 
       else {  | 
| 
385
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= '\\' . $s->_dump($$val, "\${$name}");  | 
| 
386
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
387
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
388
 | 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
229
 | 
     elsif ($realtype eq 'GLOB') {  | 
| 
389
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= '\\' . $s->_dump($$val, "*{$name}");  | 
| 
390
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
391
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
220
 | 
     elsif ($realtype eq 'ARRAY') {  | 
| 
392
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
202
 | 
       my($pad, $mname);  | 
| 
393
 | 
139
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
369
 | 
       my($i) = 0;  | 
| 
394
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
335
 | 
       $out .= ($name =~ /^\@/) ? '(' : '[';  | 
| 
395
 | 
139
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
614
 | 
       $pad = $s->{sep} . $s->{pad} . $s->{apad};  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
396
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       ($name =~ /^\@(.*)$/) ? ($mname = "\$" . $1) :  | 
| 
397
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # omit -> if $foo->[0]->{bar}, but not ${$foo->[0]}->{bar}  | 
| 
398
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         ($name =~ /^\\?[\%\@\*\$][^{].*[]}]$/) ? ($mname = $name) :  | 
| 
399
 | 
139
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
320
 | 
         ($mname = $name . '->');  | 
| 
400
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
310
 | 
       $mname .= '->' if $mname =~ /^\*.+\{[A-Z]+\}$/;  | 
| 
401
 | 
322
 | 
 
 | 
 
 | 
 
 | 
 
 | 
673
 | 
       for my $v (@$val) {  | 
| 
402
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $sname = $mname . '[' . $i . ']';  | 
| 
403
 | 
322
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
603
 | 
         $out .= $pad . $ipad . '#' . $i  | 
| 
404
 | 
322
 | 
 
 | 
 
 | 
 
 | 
 
 | 
948
 | 
           if $s->{indent} >= 3;  | 
| 
405
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= $pad . $ipad . $s->_dump($v, $sname);  | 
| 
406
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= ","  | 
| 
407
 | 
320
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1308
 | 
             if $i++ < $#$val  | 
| 
 
 | 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
408
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             || ($s->{trailingcomma} && $s->{indent} >= 1);  | 
| 
409
 | 
137
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
457
 | 
       }  | 
| 
410
 | 
137
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
383
 | 
       $out .= $pad . ($s->{xpad} x ($s->{level} - 1)) if $i;  | 
| 
411
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= ($name =~ /^\@/) ? ')' : ']';  | 
| 
412
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
413
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
372
 | 
     elsif ($realtype eq 'HASH') {  | 
| 
414
 | 
205
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
560
 | 
       my ($k, $v, $pad, $lpad, $mname, $pair);  | 
| 
415
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
485
 | 
       $out .= ($name =~ /^\%/) ? '(' : '{';  | 
| 
416
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
311
 | 
       $pad = $s->{sep} . $s->{pad} . $s->{apad};  | 
| 
417
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
302
 | 
       $lpad = $s->{apad};  | 
| 
418
 | 
205
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
989
 | 
       $pair = $s->{pair};  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
419
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       ($name =~ /^\%(.*)$/) ? ($mname = "\$" . $1) :  | 
| 
420
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # omit -> if $foo->[0]->{bar}, but not ${$foo->[0]}->{bar}  | 
| 
421
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         ($name =~ /^\\?[\%\@\*\$][^{].*[]}]$/) ? ($mname = $name) :  | 
| 
422
 | 
205
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
535
 | 
         ($mname = $name . '->');  | 
| 
423
 | 
205
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
444
 | 
       $mname .= '->' if $mname =~ /^\*.+\{[A-Z]+\}$/;  | 
| 
424
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
336
 | 
       my $sortkeys = defined($s->{sortkeys}) ? $s->{sortkeys} : '';  | 
| 
425
 | 
205
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
426
 | 
       my $keys = [];  | 
| 
426
 | 
113
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
199
 | 
       if ($sortkeys) {  | 
| 
427
 | 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
30
 | 
         if (ref($s->{sortkeys}) eq 'CODE') {  | 
| 
428
 | 
11
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
205
 | 
           $keys = $s->{sortkeys}($val);  | 
| 
429
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
228
 | 
           unless (ref($keys) eq 'ARRAY') {  | 
| 
430
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
43
 | 
             Carp::carp("Sortkeys subroutine did not return ARRAYREF");  | 
| 
431
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             $keys = [];  | 
| 
432
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           }  | 
| 
433
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
434
 | 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
467
 | 
         else {  | 
| 
435
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $keys = [ sort keys %$val ];  | 
| 
436
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
437
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
438
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
439
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
390
 | 
       # Ensure hash iterator is reset  | 
| 
440
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       keys(%$val);  | 
| 
441
 | 
205
 | 
 
 | 
 
 | 
 
 | 
 
 | 
287
 | 
    | 
| 
442
 | 
205
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
865
 | 
       my $key;  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
443
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       while (($k, $v) = ! $sortkeys ? (each %$val) :  | 
| 
444
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
          @$keys ? ($key = shift(@$keys), $val->{$key}) :  | 
| 
445
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
          () )  | 
| 
446
 | 
508
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1526
 | 
       {  | 
| 
447
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         my $nk = $s->_dump($k, "");  | 
| 
448
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
449
 | 
508
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
2884
 | 
         # _dump doesn't quote numbers of this form  | 
| 
 
 | 
 
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
450
 | 
6
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
23
 | 
         if ($s->{quotekeys} && $nk =~ /^(?:0|-?[1-9][0-9]{0,8})\z/) {  | 
| 
451
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $nk = $s->{useqq} ? qq("$nk") : qq('$nk');  | 
| 
452
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
453
 | 
150
 | 
 
 | 
 
 | 
 
 | 
 
 | 
385
 | 
         elsif (!$s->{quotekeys} and $nk =~ /^[\"\']([A-Za-z_]\w*)[\"\']$/) {  | 
| 
454
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $nk = $1  | 
| 
455
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
456
 | 
508
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1087
 | 
    | 
| 
457
 | 
508
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1010
 | 
         $sname = $mname . '{' . $nk . '}';  | 
| 
458
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= $pad . $ipad . $nk . $pair;  | 
| 
459
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
460
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         # temporarily alter apad  | 
| 
461
 | 
508
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1177
 | 
         $s->{apad} .= (" " x (length($nk) + 4))  | 
| 
462
 | 
508
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1025
 | 
           if $s->{indent} >= 2;  | 
| 
463
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= $s->_dump($val->{$k}, $sname) . ",";  | 
| 
464
 | 
505
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
2303
 | 
         $s->{apad} = $lpad  | 
| 
465
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           if $s->{indent} >= 2;  | 
| 
466
 | 
202
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
546
 | 
       }  | 
| 
467
 | 
194
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
530
 | 
       if (substr($out, -1) eq ',') {  | 
| 
468
 | 
194
 | 
 
 | 
 
 | 
 
 | 
 
 | 
503
 | 
         chop $out if !$s->{trailingcomma} || !$s->{indent};  | 
| 
469
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= $pad . ($s->{xpad} x ($s->{level} - 1));  | 
| 
470
 | 
202
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
642
 | 
       }  | 
| 
471
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= ($name =~ /^\%/) ? ')' : '}';  | 
| 
472
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
473
 | 
12
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
37
 | 
     elsif ($realtype eq 'CODE') {  | 
| 
474
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
16
 | 
       if ($s->{deparse}) {  | 
| 
475
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5553
 | 
         require B::Deparse;  | 
| 
476
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
39
 | 
         my $sub =  'sub ' . (B::Deparse->new)->coderef2text($val);  | 
| 
477
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
23
 | 
         my $pad =  $s->{sep} . $s->{pad} . $s->{apad} . $s->{xpad} x ($s->{level} - 1);  | 
| 
478
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
11
 | 
         $sub    =~ s/\n/$pad/gs;  | 
| 
479
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out   .=  $sub;  | 
| 
480
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
481
 | 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
20
 | 
       else {  | 
| 
482
 | 
8
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
269
 | 
         $out .= 'sub { "DUMMY" }';  | 
| 
483
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         Carp::carp("Encountered CODE ref, using dummy placeholder") if $s->{purity};  | 
| 
484
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
485
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
486
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
241
 | 
     else {  | 
| 
487
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       Carp::croak("Can't handle '$realtype' type");  | 
| 
488
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
489
 | 
535
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
1286
 | 
    | 
| 
490
 | 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
31
 | 
     if ($realpack and !$no_bless) { # we have a blessed ref  | 
| 
491
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= ', ' . _quote($realpack) . ' )';  | 
| 
492
 | 
13
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
40
 | 
       $out .= '->' . $s->{toaster} . '()'  | 
| 
493
 | 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
25
 | 
         if $s->{toaster} ne '';  | 
| 
494
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $s->{apad} = $blesspad;  | 
| 
495
 | 
535
 | 
 
 | 
 
 | 
 
 | 
 
 | 
934
 | 
     }  | 
| 
496
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     $s->{level}--;  | 
| 
497
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
498
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   else {                                 # simple scalar  | 
| 
499
 | 
1751
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2638
 | 
    | 
| 
500
 | 
1751
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2288
 | 
     my $ref = \$_[1];  | 
| 
501
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     my $v;  | 
| 
502
 | 
1751
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3191
 | 
     # first, catalog the scalar  | 
| 
503
 | 
1199
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2232
 | 
     if ($name ne '') {  | 
| 
504
 | 
1199
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
2496
 | 
       $id = format_refaddr($ref);  | 
| 
505
 | 
110
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
276
 | 
       if (exists $s->{seen}{$id}) {  | 
| 
506
 | 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
14
 | 
         if ($s->{seen}{$id}[2]) {  | 
| 
507
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $out = $s->{seen}{$id}[0];  | 
| 
508
 | 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
29
 | 
           #warn "[<$out]\n";  | 
| 
509
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           return "\${$out}";  | 
| 
510
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
511
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
512
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       else {  | 
| 
513
 | 
1089
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3585
 | 
         #warn "[>\\$name]\n";  | 
| 
514
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $s->{seen}{$id} = ["\\$name", $ref];  | 
| 
515
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
516
 | 
1743
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2564
 | 
     }  | 
| 
517
 | 
1743
 | 
  
100
  
 | 
  
 66
  
 | 
 
 | 
 
 | 
13575
 | 
     $ref = \$val;  | 
| 
 
 | 
 
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
 50
  
 | 
  
 33
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
518
 | 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
292
 | 
     if (ref($ref) eq 'GLOB') {  # glob  | 
| 
519
 | 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
294
 | 
       my $name = substr($val, 1);  | 
| 
520
 | 
74
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
465
 | 
       $name =~ s/^main::(?!\z)/::/;  | 
| 
521
 | 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
48
 | 
       if ($name =~ /\A(?:[A-Z_a-z][0-9A-Z_a-z]*)?::(?:[0-9A-Z_a-z]+::)*[0-9A-Z_a-z]*\z/ && $name ne 'main::') {  | 
| 
522
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $sname = $name;  | 
| 
523
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
524
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
108
 | 
       else {  | 
| 
525
 | 
44
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
123
 | 
         local $s->{useqq} = IS_PRE_516_PERL && ($s->{useqq} || $name =~ /[^\x00-\x7f]/) ? 1 : $s->{useqq};  | 
| 
526
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $sname = $s->_dump(  | 
| 
527
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $name eq 'main::'  | 
| 
528
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             ? ''  | 
| 
529
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             : $name,  | 
| 
530
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           "",  | 
| 
531
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
107
 | 
         );  | 
| 
532
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $sname = '{' . $sname . '}';  | 
| 
533
 | 
74
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
159
 | 
       }  | 
| 
534
 | 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
39
 | 
       if ($s->{purity}) {  | 
| 
535
 | 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
52
 | 
         my $k;  | 
| 
536
 | 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
45
 | 
         local ($s->{level}) = 0;  | 
| 
537
 | 
72
 | 
 
 | 
 
 | 
 
 | 
 
 | 
166
 | 
         for $k (qw(SCALAR ARRAY HASH)) {  | 
| 
538
 | 
72
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
157
 | 
           my $gval = *$val{$k};  | 
| 
539
 | 
56
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
161
 | 
           next unless defined $gval;  | 
| 
540
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           next if $k eq "SCALAR" && ! defined $$gval;  # always there  | 
| 
541
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
542
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
71
 | 
           # _dump can push into @post, so we hold our place using $postlen  | 
| 
543
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
105
 | 
           my $postlen = scalar @post;  | 
| 
544
 | 
44
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
104
 | 
           $post[$postlen] = "\*$sname = ";  | 
| 
545
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
132
 | 
           local ($s->{apad}) = " " x length($post[$postlen]) if $s->{indent} >= 2;  | 
| 
546
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $post[$postlen] .= $s->_dump($gval, "\*$sname\{$k\}");  | 
| 
547
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
548
 | 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
168
 | 
       }  | 
| 
549
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= '*' . $sname;  | 
| 
550
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
551
 | 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
22
 | 
     elsif (!defined($val)) {  | 
| 
552
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= "undef";  | 
| 
553
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
554
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # This calls the XSUB _vstring (if the XS code is loaded). I'm not *sure* if  | 
| 
555
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # if belongs in the "Pure Perl" implementation. It sort of depends on what  | 
| 
556
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # was meant by "Pure Perl", as this subroutine already relies Scalar::Util  | 
| 
557
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # loading, which means that it has an XS dependency. De facto, it's the  | 
| 
558
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # "Pure Perl" implementation of dumping (which uses XS helper code), as  | 
| 
559
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # opposed to the C implementation (which calls out to Perl helper code).  | 
| 
560
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # So in that sense this is fine - it just happens to be a local XS helper.  | 
| 
561
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif (defined &_vstring and $v = _vstring($val)  | 
| 
562
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
14
 | 
       and !_bad_vsmg || eval $v eq $val) {  | 
| 
563
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= $v;  | 
| 
564
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
565
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # However the confusion comes here - if we *can't* find our XS helper, we  | 
| 
566
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # fall back to this code, which generates different (worse) results. That's  | 
| 
567
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # better than nothing, *but* it means that if you run the regression tests  | 
| 
568
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # with Dumper.so missing, the test for "vstrings" fails, because this code  | 
| 
569
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # here generates a different result. So there are actually "three" different  | 
| 
570
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # implementations of Data::Dumper (kind of sort of) but we only test two.  | 
| 
571
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif (!defined &_vstring  | 
| 
572
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
        and ref $ref eq 'VSTRING' || eval{Scalar::Util::isvstring($val)}) {  | 
| 
573
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= sprintf "v%vd", $val;  | 
| 
574
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
575
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # \d here would treat "1\x{660}" as a safe decimal number  | 
| 
576
 | 
458
 | 
 
 | 
 
 | 
 
 | 
 
 | 
975
 | 
     elsif ($val =~ /^(?:0|-?[1-9][0-9]{0,8})\z/) { # safe decimal number  | 
| 
577
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $out .= $val;  | 
| 
578
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
579
 | 
1195
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
4305
 | 
     else {                 # string  | 
| 
580
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       if ($s->{useqq} or $val =~ tr/\0-\377//c) {  | 
| 
581
 | 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
215
 | 
         # Fall back to qq if there's Unicode  | 
| 
582
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= qquote($val, $s->{useqq});  | 
| 
583
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
584
 | 
1093
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1925
 | 
       else {  | 
| 
585
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $out .= _quote($val);  | 
| 
586
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
587
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
588
 | 
2278
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
4259
 | 
   }  | 
| 
589
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   if ($id) {  | 
| 
590
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # if we made it this far, $id was added to seen list at current  | 
| 
591
 | 
1726
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3520
 | 
     # level, so remove it to get deep copies  | 
| 
 
 | 
 
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
592
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
51
 | 
     if ($s->{deepcopy}) {  | 
| 
593
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       delete($s->{seen}{$id});  | 
| 
594
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
595
 | 
1700
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3267
 | 
     elsif ($name) {  | 
| 
596
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $s->{seen}{$id}[2] = 1;  | 
| 
597
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
598
 | 
2278
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5353
 | 
   }  | 
| 
599
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return $out;  | 
| 
600
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
601
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
602
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
603
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # non-OO style of earlier version  | 
| 
604
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
605
 | 
85
 | 
 
 | 
 
 | 
  
85
  
 | 
  
1
  
 | 
75302
 | 
 sub Dumper {  | 
| 
606
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return Data::Dumper->Dump([@_]);  | 
| 
607
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
608
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
609
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # compat stub  | 
| 
610
 | 
16
 | 
 
 | 
 
 | 
  
16
  
 | 
  
0
  
 | 
8744
 | 
 sub DumperX {  | 
| 
611
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return Data::Dumper->Dumpxs([@_], []);  | 
| 
612
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
613
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
614
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
615
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # reset the "seen" cache  | 
| 
616
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
617
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
  
1
  
 | 
9659
 | 
 sub Reset {  | 
| 
618
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
61
 | 
   my($s) = shift;  | 
| 
619
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
157
 | 
   $s->{seen} = {};  | 
| 
620
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return $s;  | 
| 
621
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
622
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
623
 | 
33
 | 
 
 | 
 
 | 
  
33
  
 | 
  
0
  
 | 
814
 | 
 sub Indent {  | 
| 
624
 | 
33
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
64
 | 
   my($s, $v) = @_;  | 
| 
625
 | 
32
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
47
 | 
   if (@_ >= 2) {  | 
| 
626
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
16
 | 
     if ($v == 0) {  | 
| 
627
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
10
 | 
       $s->{xpad} = "";  | 
| 
628
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $s->{sep} = "";  | 
| 
629
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
630
 | 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
33
 | 
     else {  | 
| 
631
 | 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
37
 | 
       $s->{xpad} = "  ";  | 
| 
632
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $s->{sep} = "\n";  | 
| 
633
 | 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
39
 | 
     }  | 
| 
634
 | 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
54
 | 
     $s->{indent} = $v;  | 
| 
635
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $s;  | 
| 
636
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
637
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4
 | 
   else {  | 
| 
638
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $s->{indent};  | 
| 
639
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
640
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
641
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
642
 | 
28
 | 
 
 | 
 
 | 
  
28
  
 | 
  
0
  
 | 
85
 | 
 sub Trailingcomma {  | 
| 
643
 | 
28
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
68
 | 
   my($s, $v) = @_;  | 
| 
644
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{trailingcomma} = $v), return $s) : $s->{trailingcomma};  | 
| 
645
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
646
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
647
 | 
3
 | 
 
 | 
 
 | 
  
3
  
 | 
  
0
  
 | 
8
 | 
 sub Pair {  | 
| 
648
 | 
3
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
18
 | 
     my($s, $v) = @_;  | 
| 
649
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     @_ >= 2 ? (($s->{pair} = $v), return $s) : $s->{pair};  | 
| 
650
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
651
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
652
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
0
  
 | 
11
 | 
 sub Pad {  | 
| 
653
 | 
2
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
11
 | 
   my($s, $v) = @_;  | 
| 
654
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{pad} = $v), return $s) : $s->{pad};  | 
| 
655
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
656
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
657
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
0
  
 | 
11
 | 
 sub Varname {  | 
| 
658
 | 
2
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
10
 | 
   my($s, $v) = @_;  | 
| 
659
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{varname} = $v), return $s) : $s->{varname};  | 
| 
660
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
661
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
662
 | 
28
 | 
 
 | 
 
 | 
  
28
  
 | 
  
0
  
 | 
83
 | 
 sub Purity {  | 
| 
663
 | 
28
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
643
 | 
   my($s, $v) = @_;  | 
| 
664
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{purity} = $v), return $s) : $s->{purity};  | 
| 
665
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
666
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
667
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
33
 | 
 sub Useqq {  | 
| 
668
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
66
 | 
   my($s, $v) = @_;  | 
| 
669
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{useqq} = $v), return $s) : $s->{useqq};  | 
| 
670
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
671
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
672
 | 
9
 | 
 
 | 
 
 | 
  
9
  
 | 
  
0
  
 | 
32
 | 
 sub Terse {  | 
| 
673
 | 
9
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
37
 | 
   my($s, $v) = @_;  | 
| 
674
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{terse} = $v), return $s) : $s->{terse};  | 
| 
675
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
676
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
677
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
31
 | 
 sub Freezer {  | 
| 
678
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
29
 | 
   my($s, $v) = @_;  | 
| 
679
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{freezer} = $v), return $s) : $s->{freezer};  | 
| 
680
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
681
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
682
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
21
 | 
 sub Toaster {  | 
| 
683
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
19
 | 
   my($s, $v) = @_;  | 
| 
684
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{toaster} = $v), return $s) : $s->{toaster};  | 
| 
685
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
686
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
687
 | 
8
 | 
 
 | 
 
 | 
  
8
  
 | 
  
0
  
 | 
45
 | 
 sub Deepcopy {  | 
| 
688
 | 
8
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
153
 | 
   my($s, $v) = @_;  | 
| 
689
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{deepcopy} = $v), return $s) : $s->{deepcopy};  | 
| 
690
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
691
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
692
 | 
7
 | 
 
 | 
 
 | 
  
7
  
 | 
  
0
  
 | 
37
 | 
 sub Quotekeys {  | 
| 
693
 | 
7
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
27
 | 
   my($s, $v) = @_;  | 
| 
694
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{quotekeys} = $v), return $s) : $s->{quotekeys};  | 
| 
695
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
696
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
697
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
29
 | 
 sub Bless {  | 
| 
698
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
21
 | 
   my($s, $v) = @_;  | 
| 
699
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'bless'} = $v), return $s) : $s->{'bless'};  | 
| 
700
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
701
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
702
 | 
10
 | 
 
 | 
 
 | 
  
10
  
 | 
  
0
  
 | 
29
 | 
 sub Maxdepth {  | 
| 
703
 | 
10
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
216
 | 
   my($s, $v) = @_;  | 
| 
704
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'maxdepth'} = $v), return $s) : $s->{'maxdepth'};  | 
| 
705
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
706
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
707
 | 
  
0
  
 | 
 
 | 
 
 | 
  
0
  
 | 
  
0
  
 | 
0
 | 
 sub Maxrecurse {  | 
| 
708
 | 
  
0
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
0
 | 
   my($s, $v) = @_;  | 
| 
709
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'maxrecurse'} = $v), return $s) : $s->{'maxrecurse'};  | 
| 
710
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
711
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
712
 | 
3
 | 
 
 | 
 
 | 
  
3
  
 | 
  
0
  
 | 
17
 | 
 sub Useperl {  | 
| 
713
 | 
3
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
12
 | 
   my($s, $v) = @_;  | 
| 
714
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'useperl'} = $v), return $s) : $s->{'useperl'};  | 
| 
715
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
716
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
717
 | 
39
 | 
 
 | 
 
 | 
  
39
  
 | 
  
0
  
 | 
122
 | 
 sub Sortkeys {  | 
| 
718
 | 
39
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
96
 | 
   my($s, $v) = @_;  | 
| 
719
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'sortkeys'} = $v), return $s) : $s->{'sortkeys'};  | 
| 
720
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
721
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
722
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
27
 | 
 sub Deparse {  | 
| 
723
 | 
6
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
23
 | 
   my($s, $v) = @_;  | 
| 
724
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'deparse'} = $v), return $s) : $s->{'deparse'};  | 
| 
725
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
726
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
727
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
33
 | 
 sub Sparseseen {  | 
| 
728
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
25
 | 
   my($s, $v) = @_;  | 
| 
729
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   @_ >= 2 ? (($s->{'noseen'} = $v), return $s) : $s->{'noseen'};  | 
| 
730
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
731
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
732
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # used by qquote below  | 
| 
733
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 my %esc = (  | 
| 
734
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\a" => "\\a",  | 
| 
735
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\b" => "\\b",  | 
| 
736
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\t" => "\\t",  | 
| 
737
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\n" => "\\n",  | 
| 
738
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\f" => "\\f",  | 
| 
739
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\r" => "\\r",  | 
| 
740
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     "\e" => "\\e",  | 
| 
741
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 );  | 
| 
742
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
743
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 my $low_controls = ($IS_ASCII)  | 
| 
744
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
745
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    # This includes \177, because traditionally it has been  | 
| 
746
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    # output as octal, even though it isn't really a "low"  | 
| 
747
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    # control  | 
| 
748
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    ? qr/[\0-\x1f\177]/  | 
| 
749
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
750
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                      # EBCDIC low controls.  | 
| 
751
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
                    : qr/[\0-\x3f]/;  | 
| 
752
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
753
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # put a string value in double quotes  | 
| 
754
 | 
102
 | 
 
 | 
 
 | 
  
102
  
 | 
  
0
  
 | 
189
 | 
 sub qquote {  | 
| 
755
 | 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
260
 | 
   local($_) = shift;  | 
| 
756
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   s/([\\\"\@\$])/\\$1/g;  | 
| 
757
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
758
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # This efficiently changes the high ordinal characters to \x{} if the utf8  | 
| 
759
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # flag is on.  On ASCII platforms, the high ordinals are all the  | 
| 
760
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # non-ASCII's.  On EBCDIC platforms, we don't include in these the non-ASCII  | 
| 
761
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # controls whose ordinals are less than SPACE, excluded below by the range  | 
| 
762
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # \0-\x3f.  On ASCII platforms this range just compiles as part of :ascii:.  | 
| 
763
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # On EBCDIC platforms, there is just one outlier high ordinal control, and  | 
| 
764
 | 
26
 | 
 
 | 
 
 | 
  
26
  
 | 
 
 | 
19263
 | 
   # it gets output as \x{}.  | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
427
 | 
    | 
| 
 
 | 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
143
 | 
    | 
| 
 
 | 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
136
 | 
    | 
| 
 
 | 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
140
 | 
    | 
| 
 
 | 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
147
 | 
    | 
| 
765
 | 
314
 | 
 
 | 
 
 | 
 
 | 
 
 | 
981
 | 
   my $bytes; { use bytes; $bytes = length }  | 
| 
766
 | 
102
 | 
  
100
  
 | 
  
 33
  
 | 
 
 | 
 
 | 
467
 | 
   s/([^[:ascii:]\0-\x3f])/sprintf("\\x{%x}",ord($1))/ge  | 
| 
 
 | 
 
 | 
 
 | 
  
 66
  
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
767
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     if $bytes > length  | 
| 
768
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
769
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
        # The above doesn't get the EBCDIC outlier high ordinal control when  | 
| 
770
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
        # the string is UTF-8 but there are no UTF-8 variant characters in it.  | 
| 
771
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
        # We want that to come out as \x{} anyway.  We need is_utf8() to do  | 
| 
772
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
        # this.  | 
| 
773
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
        || (! $IS_ASCII && utf8::is_utf8($_));  | 
| 
774
 | 
102
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
476
 | 
    | 
| 
775
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return qq("$_") unless /[[:^print:]]/;  # fast exit if only printables  | 
| 
776
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
777
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # Here, there is at least one non-printable to output.  First, translate the  | 
| 
778
 | 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
150
 | 
   # escapes.  | 
| 
779
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   s/([\a\b\t\n\f\r\e])/$esc{$1}/g;  | 
| 
780
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
781
 | 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
216
 | 
   # no need for 3 digits in escape for octals not followed by a digit.  | 
| 
 
 | 
119
 | 
 
 | 
 
 | 
 
 | 
 
 | 
402
 | 
    | 
| 
782
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   s/($low_controls)(?!\d)/'\\'.sprintf('%o',ord($1))/eg;  | 
| 
783
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
784
 | 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
147
 | 
   # But otherwise use 3 digits  | 
| 
 
 | 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
24
 | 
    | 
| 
785
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   s/($low_controls)/'\\'.sprintf('%03o',ord($1))/eg;  | 
| 
786
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
787
 | 
33
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
84
 | 
     # all but last branch below not supported --BEHAVIOR SUBJECT TO CHANGE--  | 
| 
788
 | 
33
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
100
 | 
   my $high = shift || "";  | 
| 
 
 | 
 
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
789
 | 
  
0
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     if ($high eq "iso8859") {   # Doesn't escape the Latin1 printables  | 
| 
790
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
       if ($IS_ASCII) {  | 
| 
 
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
    | 
| 
791
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         s/([\200-\240])/'\\'.sprintf('%o',ord($1))/eg;  | 
| 
792
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
793
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
       else {  | 
| 
794
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
         my $high_control = utf8::unicode_to_native(0x9F);  | 
| 
 
 | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
    | 
| 
795
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         s/$high_control/sprintf('\\%o',ord($1))/eg;  | 
| 
796
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
797
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     } elsif ($high eq "utf8") {  | 
| 
798
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #     Some discussion of what to do here is in  | 
| 
799
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #       https://rt.perl.org/Ticket/Display.html?id=113088  | 
| 
800
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #     use utf8;  | 
| 
801
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #     $str =~ s/([^\040-\176])/sprintf "\\x{%04x}", ord($1)/ge;  | 
| 
802
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     } elsif ($high eq "8bit") {  | 
| 
803
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         # leave it as it is  | 
| 
804
 | 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
107
 | 
     } else {  | 
| 
 
 | 
264
 | 
 
 | 
 
 | 
 
 | 
 
 | 
629
 | 
    | 
| 
805
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       s/([[:^ascii:]])/'\\'.sprintf('%03o',ord($1))/eg;  | 
| 
806
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       #s/([^\040-\176])/sprintf "\\x{%04x}", ord($1)/ge;  | 
| 
807
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
808
 | 
33
 | 
 
 | 
 
 | 
 
 | 
 
 | 
131
 | 
    | 
| 
809
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return qq("$_");  | 
| 
810
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
811
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
812
 | 
981
 | 
 
 | 
 
 | 
  
981
  
 | 
 
 | 
1406
 | 
 sub _refine_name {  | 
| 
813
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1782
 | 
     my $s = shift;  | 
| 
814
 | 
981
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1811
 | 
     my ($name, $val, $i) = @_;  | 
| 
815
 | 
203
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
755
 | 
     if (defined $name) {  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
816
 | 
77
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
145
 | 
       if ($name =~ /^[*](.*)$/) {  | 
| 
817
 | 
76
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
318
 | 
         if (defined $val) {  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
818
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             $name = (ref $val eq 'ARRAY') ? ( "\@" . $1 ) :  | 
| 
819
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
               (ref $val eq 'HASH')  ? ( "\%" . $1 ) :  | 
| 
820
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
               (ref $val eq 'CODE')  ? ( "\*" . $1 ) :  | 
| 
821
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
               ( "\$" . $1 ) ;  | 
| 
822
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
823
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3
 | 
         else {  | 
| 
824
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           $name = "\$" . $1;  | 
| 
825
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
826
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
827
 | 
125
 | 
 
 | 
 
 | 
 
 | 
 
 | 
279
 | 
       elsif ($name !~ /^\$/) {  | 
| 
828
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         $name = "\$" . $name;  | 
| 
829
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       }  | 
| 
830
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
831
 | 
778
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1628
 | 
     else { # no names provided  | 
| 
832
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $name = "\$" . $s->{varname} . $i;  | 
| 
833
 | 
981
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1939
 | 
     }  | 
| 
834
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $name;  | 
| 
835
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
836
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
837
 | 
976
 | 
 
 | 
 
 | 
  
976
  
 | 
 
 | 
1351
 | 
 sub _compose_out {  | 
| 
838
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1731
 | 
     my $s = shift;  | 
| 
839
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1331
 | 
     my ($valstr, $postref) = @_;  | 
| 
840
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2373
 | 
     my $out = "";  | 
| 
841
 | 
976
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1423
 | 
     $out .= $s->{pad} . $valstr . $s->{sep};  | 
| 
 
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1885
 | 
    | 
| 
842
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     if (@{$postref}) {  | 
| 
843
 | 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
116
 | 
         $out .= $s->{pad} .  | 
| 
844
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             join(';' . $s->{sep} . $s->{pad}, @{$postref}) .  | 
| 
845
 | 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
65
 | 
             ';' .  | 
| 
846
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             $s->{sep};  | 
| 
847
 | 
976
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1968
 | 
     }  | 
| 
848
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return $out;  | 
| 
849
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
850
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
851
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  | 
| 
852
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 __END__  |