1611 shaares
17 private links
17 private links
4 results
tagged
dumper
Want to see what's inside a variable in a complete, colored and human-friendly way?
use Data::Printer; # or just "use DDP" for short
p @array; # no need to pass references
Code above might output something like this (with colors!):
[
[0] "a",
[1] "b",
[2] undef,
[3] "c",
]
You can also inspect objects:
my $obj = SomeClass->new;
p($obj);
Which might give you something like:
\ SomeClass {
Parents Moose::Object
Linear @ISA SomeClass, Moose::Object
public methods (3) : bar, foo, meta
private methods (0)
internals: {
_something => 42,
}
}