Data::Dumper::Concise::Aligned - even less indentation plus string prefix
use Data::Dumper::Concise::Aligned; warn DumperA S => \@input, D => \@output;
Like Data::Dumper::Concise except with even less indentation, and string prefixing of the wrapped-as-necessary output. Used in particular to look at data that needs to be shown in as compact a manner as possible for easy vertical comparison (hypothetically, musical pitch numbers), for example:
S [[2,2,1,2,2,2,1],[1,2,2,2,1,2,2]] D [[2,1,2,2,2,2,1],[2,2,1,2,2,1,2]]
This could possibly be done via DumperF of Data::Dumper::Concise, but that's more typing, and not exactly the string prefix handling I wanted.
DumperF
In vi type editors, an ab editor configuration along the lines of the following can expand out to include the desired Dumper routine:
vi
ab
ab PUDD use Data::Dumper; warn Dumper ab PUCC use Data::Dumper::Concise::Aligned; warn DumperA
Dumper, aligned, concise. Should be called with key value pairs, where the key is presumably some short label used to prefix the concisely dumped subsequent reference to some data structure. This function is exported by default.
A mostly internal function used by DumperA. Returns the Data::Dumper object with formatting options as used by this module set. Not exported by default since version 0.25.
Data::Dump, Data::Dumper::Concise, Data::Dumper, or so forth and so on from CPAN, one of which will hopefully meet your needs. If not, well, you can always write your own. Another good debugging tip is the %vd printf format, for seeing what the data really contains, but then you'll probably want to also know about ascii(7):
%vd
printf
printf "%vd\n", "hi\r\tthere";
Text::Wrap is used to wrap text that strays beyond the usual punchcard inherited limits.
ascii(7), vi(1)
thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>
<jmates at cpan.org>
Copyright (C) 2013,2015 by Jeremy Mates
This module is free software; you can redistribute it and/or modify it under the Artistic License (2.0).
To install Data::Dumper::Concise::Aligned, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Dumper::Concise::Aligned
CPAN shell
perl -MCPAN -e shell install Data::Dumper::Concise::Aligned
For more information on module installation, please visit the detailed CPAN module installation guide.