I've started using Data::Printer recently. It makes the output so much more
readable! Highly recommended for debugging purposes. Simple as: "use DDP; p
%my_structure;"
On Sat, Feb 9, 2013 at 4:23 AM, Morse, Richard E.MGH
wrote:
> There are alternatives to Data::Dumper -- I personally like Data::
> I'm not sure how it can be done generically
Well, this is what I have for dumping a linked list where
the element is an array. [0] is payload. [1] is next. [2] is prev:
sub DumpLLArray{
my($element, $next,$prev)=@_;
$next=1 unless(defined($next));
$prev=2 unless(define
On Feb 8, 2013, at 12:33 PM, Chris Devers wrote:
> I'd advise reading this:
>
> http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/
>
> Then think real hard about if YAML is the way to go for *anything* right
> now.
>
> The current problem is with Ruby, bu
I'd advise reading this:
http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/
Then think real hard about if YAML is the way to go for *anything* right
now.
The current problem is with Ruby, but it seems plausible that other
languages could be affected as well
I'm not sure how it can be done generically because there is no generic linked
list structure in perl, right? There is an array, though, so convert to an
array and then use data dumper. if the array is in the reverse order,
Data::Dumper will indicate it's already printed the "next" portion and
There are alternatives to Data::Dumper -- I personally like Data::Dump, but
there seem to be a lot of modules in that space. In particular, I've seen
recommendations for Data::Dump::Streamer, and if you don't need to be able to
re-eval it, you could look at Data::Printer.
HTH,
Ricky
On Feb 8,
Not sure what you mean by "linked lists" -- the traditional concept of that
data structure doesn't really exist in Perl.
Generally, though, I would recommend YAML for more human-readable data
serialization. It has excellent features for pointers/references without
being verbose. It also has the
Is there a module out there for dumping linked lists in a legible manner?
I like that Data::Dumper gives you an output that can be "eval"ed back in,
but when you give it a linked list, it gives you an output that's totally
unreadable.
___
Boston-p
8 matches
Mail list logo