$ perl -dT 1.dt.pl Loading DB routines from perl5db.pl version 1.55 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(1.dt.pl:7): say "this provides a solid entry point for debugger"; DB<1> n this provides a solid entry point for debugger main::(1.dt.pl:9): print main::(1.dt.pl:10): "Content-Type: text/plain\r\n\r\n", main::(1.dt.pl:11): Data::Dumper->new( [ \%ENV ], ['*ENV'] )->Sortkeys(1)->Useqq(1)->Dump(); DB<1> s Data::Dumper::new(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:72): 72: my($c, $v, $n) = @_; DB<1> v 69 # to cause output of arrays and hashes rather than refs. 70 # 71 sub new { 72==> my($c, $v, $n) = @_; 73 74: Carp::croak("Usage: PACKAGE->new(ARRAYREF, [ARRAYREF])") 75 unless (defined($v) && (ref($v) eq 'ARRAY')); 76: $n = [] unless (defined($n) && (ref($n) eq 'ARRAY')); 77 78: my($s) = { DB<1> p @_ Data::DumperARRAY(0x55cf0af7c438)ARRAY(0x55cf0ae9e3e0) ... DB<8> n Data::Dumper::new(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:78): 78: my($s) = { 79: level => 0, # current recursive depth 80: indent => $Indent, # various styles of indenting 81: trailingcomma => $Trailingcomma, # whether to add comma after last elem 82: pad => $Pad, # all lines prefixed by this string 83: xpad => "", # padding-per-level 84: apad => "", # added padding for hash keys n such 85: sep => "", # list separator 86: pair => $Pair, # hash key/value separator: defaults to ' => ' 87: seen => {}, # local (nested) refs (id => [name, val]) 88: todump => $v, # values to dump [] 89: names => $n, # optional names for values [] 90: varname => $Varname, # prefix to use for tagging nameless ones 91: purity => $Purity, # degree to which output is evalable 92: useqq => $Useqq, # use "" for strings (backslashitis ensues) 93: terse => $Terse, # avoid name output (where feasible) 94: freezer => $Freezer, # name of Freezer method for objects 95: toaster => $Toaster, # name of method to revive objects 96: deepcopy => $Deepcopy, # do not cross-ref, except to stop recursion 97: quotekeys => $Quotekeys, # quote hash keys 98: 'bless' => $Bless, # keyword to use for "bless" DB<8> n Data::Dumper::new(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:108): 108: if ($Indent > 0) { DB<8> n Data::Dumper::new(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:109): 109: $s->{xpad} = " "; DB<8> n Data::Dumper::new(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:110): 110: $s->{sep} = "\n"; DB<8> n Data::Dumper::new(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:112): 112: return bless($s, $c); DB<8> p $s HASH(0x55cf0b055668) DB<9> p $c Data::Dumper DB<10> r scalar context return from Data::Dumper::new: 'apad' => '' 'bless' => 'bless' 'deepcopy' => 0 ... ' 'sortkeys' => 0 'terse' => 0 'toaster' => '' 'todump' => ARRAY(0x55cf0af7c438) 0 HASH(0x55cf0a6457a0) 'COLORTERM' => 'truecolor' 'DBUS_SESSION_BUS_ADDRESS' => 'unix:path=/run/user/1000/bus,guid=25f1c2dbc402335e5a6581fd60d50980' ... 'XDG_SESSION_TYPE' => 'x11' 'XMODIFIERS' => '@im=ibus' '_' => '/usr/bin/perl' 'trailingcomma' => 0 'useperl' => 0 'useqq' => 0 'varname' => 'VAR' 'xpad' => ' ' Data::Dumper::Sortkeys(/usr/lib/x86_64-linux-gnu/perl/5.30/Data/Dumper.pm:716): 716: my($s, $v) = @_; DB<10> c Content-Type: text/plain %ENV = ( "COLORTERM" => "truecolor", ... "_" => "/usr/bin/perl" ); Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<10> q #### #!/usr/bin/perl -dT use v5.030; use warnings; use Data::Dumper; say "this provides a solid entry point for debugger"; print "Content-Type: text/plain\r\n\r\n", Data::Dumper->new( [ \%ENV ], ['*ENV'] )->Sortkeys(1)->Useqq(1)->Dump();