Acme-CPANModules-DumpingDataForDebugging
view release on metacpan or search on metacpan
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::More" : "0"
}
},
"x_lists" : {
"x_lists" : {
"Data::Dump" : "0",
"Data::Dump::Color" : "0",
"Data::Dumper" : "0",
"Data::Dumper::Compact" : "0",
"Data::Printer" : "0",
"JSON::Color" : "0",
"XXX" : "0",
"YAML::Tiny::Color" : "0"
}
},
"x_mentions" : {
"x_mentions" : {
"Data::Dump" : "0",
"Data::Dump::Color" : "0",
"Data::Dumper" : "0",
"Data::Dumper::Compact" : "0",
"Data::Printer" : "0",
"JSON::Color" : "0",
"XXX" : "0",
"YAML::Tiny::Color" : "0"
}
}
},
"provides" : {
"Acme::CPANModules::DumpingDataForDebugging" : {
"file" : "lib/Acme/CPANModules/DumpingDataForDebugging.pm",
Acme::CPANModules::DumpingDataForDebugging (from Perl distribution
Acme-CPANModules-DumpingDataForDebugging), released on 2023-10-29.
DESCRIPTION
This list catalogs some of the modules you can you to dump your data
structures for debugging purposes, so the modules will be judged mostly
by the appropriateness of its output for human viewing (instead of other
criteria like speed, footprint, etc).
ACME::CPANMODULES ENTRIES
Data::Dumper
Author: NWCLARK <https://metacpan.org/author/NWCLARK>
Everybody knows this module and it's core so sometimes it's the only
appropriate choice. However, the default setting is not really
optimized for viewing by human. I suggest you tweak these before
dumping your data:
* Set $Data::Dumper::Useqq to 1.
By default, Data::Dumper quotes strings using single-quotes and does
not quote things like "\n" and "\b" making it difficult to spot
special characters.
Data::Dump
Author: GARU <https://metacpan.org/author/GARU>
A data dumper that produces nicer Perl code output, with features
like vertical alignment of "=>" when dumping hashes, compacting
sequences like 1,2,3,4,5,6 to 1..6, compacting repeating characters
in string like "ccccccccccccccccccccc" to ("c" x 21), and so on.
It tries harder to produce Perl code that generates the original
data structure, particularly with circular references. But with
interlinked references like trees, Data::Dumper might be more
helpful in showing you which references get mentioned where. For
example this data:
$tree = {children=>[{children=>[{}]}, {children=>[]}]};
$tree->{children}[0]{parent}=$tree;
$tree->{children}[1]{parent}=$tree;
$tree->{children}[0]{children}[0]{parent} = $tree->{children}[0];
Data::Dump will produce:
{ children => [{ parent => 'fix' }], parent => 'fix' },
{ children => [], parent => 'fix' },
],
};
$a->{children}[0]{children}[0]{parent} = $a->{children}[0];
$a->{children}[0]{parent} = $a;
$a->{children}[1]{parent} = $a;
$a;
}
while Data::Dumper will produce:
$VAR1 = {
'children' => [
{
'children' => [
{
'parent' => $VAR1->{'children'}[0]
}
],
'parent' => $VAR1
};
Data::Dump::Color
Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>
A modification to Data::Dump which adds color (and color theme)
support, as well as other visual aids like depth and array
index/hash pair count indicator. It's usually my go-to module for
debugging.
Data::Dumper::Compact
Author: MSTROUT <https://metacpan.org/author/MSTROUT>
A relatively recent module by MSTROUT. I will need to use this more
to see if I really like the output, but so far I do.
XXX Author: INGY <https://metacpan.org/author/INGY>
A nice little dumper module from the creator of YAML. Obviously, it
uses YAML output by default but it's configurable to dump in other
formats. For example:
lib/Acme/CPANModules/DumpingDataForDebugging.pm view on Meta::CPAN
description => <<'_',
This list catalogs some of the modules you can you to dump your data structures
for debugging purposes, so the modules will be judged mostly by the
appropriateness of its output for human viewing (instead of other criteria like
speed, footprint, etc).
_
entries => [
{
module=>'Data::Dumper',
tags => ['perl'],
description => <<'_',
Everybody knows this module and it's core so sometimes it's the only appropriate
choice. However, the default setting is not really optimized for viewing by
human. I suggest you tweak these before dumping your data:
* Set $Data::Dumper::Useqq to 1.
By default, <pm:Data::Dumper> quotes strings using single-quotes and does not
quote things like "\n" and "\b" making it difficult to spot special characters.
_
},
{
module=>'Data::Dump',
tags => ['perl'],
description => <<'_',
A data dumper that produces nicer Perl code output, with features like vertical
alignment of "=>" when dumping hashes, compacting sequences like 1,2,3,4,5,6 to
1..6, compacting repeating characters in string like "ccccccccccccccccccccc" to
("c" x 21), and so on.
It tries harder to produce Perl code that generates the original data structure,
particularly with circular references. But with interlinked references like
trees, Data::Dumper might be more helpful in showing you which references get
mentioned where. For example this data:
$tree = {children=>[{children=>[{}]}, {children=>[]}]};
$tree->{children}[0]{parent}=$tree;
$tree->{children}[1]{parent}=$tree;
$tree->{children}[0]{children}[0]{parent} = $tree->{children}[0];
Data::Dump will produce:
do {
lib/Acme/CPANModules/DumpingDataForDebugging.pm view on Meta::CPAN
{ children => [{ parent => 'fix' }], parent => 'fix' },
{ children => [], parent => 'fix' },
],
};
$a->{children}[0]{children}[0]{parent} = $a->{children}[0];
$a->{children}[0]{parent} = $a;
$a->{children}[1]{parent} = $a;
$a;
}
while Data::Dumper will produce:
$VAR1 = {
'children' => [
{
'children' => [
{
'parent' => $VAR1->{'children'}[0]
}
],
'parent' => $VAR1
lib/Acme/CPANModules/DumpingDataForDebugging.pm view on Meta::CPAN
description => <<'_',
A modification to Data::Dump which adds color (and color theme) support, as well
as other visual aids like depth and array index/hash pair count indicator. It's
usually my go-to module for debugging.
_
},
{
module=>'Data::Dumper::Compact',
tags => ['perl'],
description => <<'_',
A relatively recent module by MSTROUT. I will need to use this more to see if I
really like the output, but so far I do.
_
},
{
lib/Acme/CPANModules/DumpingDataForDebugging.pm view on Meta::CPAN
This list catalogs some of the modules you can you to dump your data structures
for debugging purposes, so the modules will be judged mostly by the
appropriateness of its output for human viewing (instead of other criteria like
speed, footprint, etc).
=head1 ACME::CPANMODULES ENTRIES
=over
=item L<Data::Dumper>
Author: L<NWCLARK|https://metacpan.org/author/NWCLARK>
Everybody knows this module and it's core so sometimes it's the only appropriate
choice. However, the default setting is not really optimized for viewing by
human. I suggest you tweak these before dumping your data:
=over
=item * Set $Data::Dumper::Useqq to 1.
=back
By default, L<Data::Dumper> quotes strings using single-quotes and does not
quote things like "\n" and "\b" making it difficult to spot special characters.
=item L<Data::Dump>
Author: L<GARU|https://metacpan.org/author/GARU>
A data dumper that produces nicer Perl code output, with features like vertical
alignment of "=>" when dumping hashes, compacting sequences like 1,2,3,4,5,6 to
1..6, compacting repeating characters in string like "ccccccccccccccccccccc" to
("c" x 21), and so on.
It tries harder to produce Perl code that generates the original data structure,
particularly with circular references. But with interlinked references like
trees, Data::Dumper might be more helpful in showing you which references get
mentioned where. For example this data:
$tree = {children=>[{children=>[{}]}, {children=>[]}]};
$tree->{children}[0]{parent}=$tree;
$tree->{children}[1]{parent}=$tree;
$tree->{children}[0]{children}[0]{parent} = $tree->{children}[0];
Data::Dump will produce:
do {
lib/Acme/CPANModules/DumpingDataForDebugging.pm view on Meta::CPAN
{ children => [{ parent => 'fix' }], parent => 'fix' },
{ children => [], parent => 'fix' },
],
};
$a->{children}[0]{children}[0]{parent} = $a->{children}[0];
$a->{children}[0]{parent} = $a;
$a->{children}[1]{parent} = $a;
$a;
}
while Data::Dumper will produce:
$VAR1 = {
'children' => [
{
'children' => [
{
'parent' => $VAR1->{'children'}[0]
}
],
'parent' => $VAR1
lib/Acme/CPANModules/DumpingDataForDebugging.pm view on Meta::CPAN
=item L<Data::Dump::Color>
Author: L<PERLANCAR|https://metacpan.org/author/PERLANCAR>
A modification to Data::Dump which adds color (and color theme) support, as well
as other visual aids like depth and array index/hash pair count indicator. It's
usually my go-to module for debugging.
=item L<Data::Dumper::Compact>
Author: L<MSTROUT|https://metacpan.org/author/MSTROUT>
A relatively recent module by MSTROUT. I will need to use this more to see if I
really like the output, but so far I do.
=item L<XXX>
Author: L<INGY|https://metacpan.org/author/INGY>
( run in 0.242 second using v1.01-cache-2.11-cpan-4d50c553e7e )