41 |
} |
} |
42 |
|
|
43 |
die ref($self), ": $class\:\:$field: unexpected $refdef" |
die ref($self), ": $class\:\:$field: unexpected $refdef" |
44 |
unless $refdef eq 'HASH'; |
unless $refdef eq 'HASH' or $refdef eq 'Tangram::PerlDump'; |
45 |
|
|
46 |
$def->{col} ||= $schema->normalize->($field, 'colname'); |
$def->{col} ||= $schema->{normalize}->($field, 'colname'); |
47 |
$def->{sql} ||= 'VARCHAR(255)'; |
$def->{sql} ||= 'VARCHAR(255)'; |
48 |
$def->{indent} ||= 0; |
$def->{indent} ||= 0; |
49 |
$def->{terse} ||= 1; |
$def->{terse} ||= 1; |
50 |
$def->{purity} ||= 0; |
$def->{purity} ||= 0; |
51 |
$def->{dumper} ||= sub { |
$def->{dumper} ||= sub { |
52 |
|
|
53 |
|
# remember settings |
54 |
|
$def->{cache}->{indent} = $Data::Dumper::Indent; |
55 |
|
$def->{cache}->{terse} = $Data::Dumper::Terse; |
56 |
|
$def->{cache}->{purity} = $Data::Dumper::Purity; |
57 |
|
$def->{cache}->{varname} = $Data::Dumper::Varname; |
58 |
|
|
59 |
$Data::Dumper::Indent = $def->{indent}; |
$Data::Dumper::Indent = $def->{indent}; |
60 |
$Data::Dumper::Terse = $def->{terse}; |
$Data::Dumper::Terse = $def->{terse}; |
61 |
$Data::Dumper::Purity = $def->{purity}; |
$Data::Dumper::Purity = $def->{purity}; |
62 |
$Data::Dumper::Varname = '_t::v'; |
$Data::Dumper::Varname = '_t::v'; |
63 |
Data::Dumper->$DumpMeth([@_], []); |
my $dump = Data::Dumper->$DumpMeth([@_], []); |
64 |
|
|
65 |
|
# restore settings |
66 |
|
$Data::Dumper::Indent = $def->{cache}->{indent}; |
67 |
|
$Data::Dumper::Terse = $def->{cache}->{terse}; |
68 |
|
$Data::Dumper::Purity = $def->{cache}->{purity}; |
69 |
|
$Data::Dumper::Varname = $def->{cache}->{varname}; |
70 |
|
|
71 |
|
return $dump; |
72 |
|
|
73 |
}; |
}; |
74 |
} |
} |
75 |
|
|