/usr/share/perl5/Tangram/Type/Dump/Perl.pod is in libtangram-perl 2.10-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | =head1 NAME
Tangram::Type::Dump::Perl - map any Perl object as scalar dump
=head1 SYNOPSIS
use Tangram::Core;
use Tangram::Type::Dump::Perl; # always
$schema = Tangram::Schema->new(
classes => { NaturalPerson => { fields => {
perl_dump =>
{
diary => # diary is a perl hash
{
col => 'diarydata',
sql => 'TEXT',
indent => 0,
terse => 1,
purity => 0
},
lucky_numbers => 'int', # use defaults
}
=head1 DESCRIPTION
Maps arbitrary Perl data structures by serializing to a string
representation. The persistent fields are grouped in a hash under the
C<perl_dump> key in the field hash.
Serialization is done by L<Data::Dumper>, which traverses the Perl
data structure and creates a string representation of it. The
resulting string will be mapped to the DBMS as a scalar value. During
restore, the scalar value will be L<eval>'d to reconstruct the
original data structure.
As of Tangram 2.07.1, persistent references are safely handled via the
L<Tangram::Type::Dump> utility class.
The field names are passed in a hash that associates a field name with
a field descriptor. The field descriptor may be either a hash or a
string. The hash uses the following fields:
=over 4
=item * col
=item * sql
=item * indent
=item * terse
=item * purity
=back
The optional fields C<col> and C<sql> specify the column name and the
column type for the scalar value in the database. If not present,
C<col> defaults to the field name and C<sql> defaults to VARCHAR(255).
Values will be always quoted as they are passed to the database.
The remaining optional fields control the serialization process. They
will be passed down to L<Data::Dumper> as values to the corresponding
L<Data::Dumper> options. The default settings are: no indentation
(C<indent=0>), compact format (C<terse=1>), and quick dump
(C<purity=0>).
=head1 AUTHOR
This mapping was contributed by Gabor Herr
<herr@iti.informatik.tu-darmstadt.de>
|