6 use Test
::More tests
=> 42;
10 die "Cannot load Data::Peek\n" if $@
; # BAIL_OUT not avail in old Test::More
13 my ($dump, $var) = ("", "");
16 my ($v, $exp, $re) = split m/\t+ */;
25 ok
($dump = DDumper
($var), "DDumper ($v)");
26 $dump =~ s/\A\$VAR1 = //;
30 like
($dump, qr{$exp}m, ".. content $re");
31 $1 and print STDERR
"# '$1' (", length ($1), ")\n";
34 is
($dump, $exp, ".. content");
58 [0,1,2] \A\[\n\s+0,\n\s+1,\n\s+2\n\s+]\Z line splitting
60 [0] \A\[\n 0\n ]\Z single indent
61 [[0],{foo=>1}] ^\[\n outer list
62 ^ {4}\[\n {8}0\n {8}],\n {4} inner list
63 ^ {4}\{\n {8}foo {14}=> 1\n {8}}\n inner hash
64 ^ {4}]\Z outer list end
65 [[0],{foo=>1}] \A\[\n {4}\[\n {8}0\n {8}],\n {4}\{\n {8}foo {14}=> 1\n {8}}\n {4}]\Z full struct