1336 links
  • linx
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
  • ► Play Videos
Links per page: 20 50 100
page 1 / 1
  • Data::Printer - colored pretty-print of Perl data structures and objects - metacpan.org

    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,
    }
    }

    August 8, 2015 at 2:49:51 PM UTC - permalink -
    QRCode
    - https://metacpan.org/pod/Data::Printer
    dumper log module object perl
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation