release 0.42
[Data-Peek.git] / examples / ddumper.pl
blob79ec07b0877f238c89f2111ba37c8e94c2bf1b79
1 #!/pro/bin/perl
3 use strict;
4 use warnings;
6 use Data::Peek;
8 my %hash = (
9 foo => "bar\x{0a}baz",
10 bar => [ 1, "mars", \@ARGV ],
13 print DPeek for DDual ($!, 1);
15 print "DDumper (\\%hash)\n";
16 print DDumper \%hash;
18 print "\$str = DDump (%hash)\n";
19 my $str = DDump \%hash;
20 print $str;
21 print "\%hsh = DDump (%hash)\n";
22 my %hsh = DDump \%hash;
23 print DDumper \%hsh;
25 print "DDump \\%hash\n";
26 DDump \%hash;
28 print "\$str = DDump (%hash, 5)\n";
29 my $str = DDump (\%hash, 1);
30 print $str;
31 print "\%hsh = DDump (%hash, 5)\n";
32 my %hsh = DDump (\%hash, 1);
33 print DDumper \%hsh;
35 print "DDump \\%hash, 5\n";
36 DDump (\%hash, 1);