File: ddumper.pl

package info (click to toggle)
libdata-peek-perl 0.38-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 328 kB
  • sloc: perl: 694; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/pro/bin/perl

use strict;
use warnings;

use Data::Peek;

my %hash = (
    foo => "bar\x{0a}baz",
    bar => [ 1, "mars", \@ARGV ],
    );

print DPeek for DDual ($!, 1);

print "DDumper (\\%hash)\n";
print DDumper \%hash;

print "\$str = DDump (%hash)\n";
my $str = DDump \%hash;
print $str;
print "\%hsh = DDump (%hash)\n";
my %hsh = DDump \%hash;
print DDumper \%hsh;

print "DDump \\%hash\n";
DDump \%hash;

print "\$str = DDump (%hash, 5)\n";
my $str = DDump (\%hash, 1);
print $str;
print "\%hsh = DDump (%hash, 5)\n";
my %hsh = DDump (\%hash, 1);
print DDumper \%hsh;

print "DDump \\%hash, 5\n";
DDump (\%hash, 1);