Tangra...p::YAML(3pm)
π NAME π
Tangram::Type::Dump::YAML β bestie, this one serialises the fields of an object into a column via YAML β¨
π SYNOPSIS π
okay so here's the whole vibe, copy it, don't fight it:
use Tangram::Core;
use Tangram::Type::Dump::YAML;
$schema = Tangram::Schema->new(
classes => { NaturalPerson => { fields => {
yaml =>
{
diary => # diary is a perl hash
{
col => 'diarydata',
sql => 'TEXT', # better be large enough! :)
# YAML dumper control, values here are defaults
options => {
Indent => 2,
UseHeader => 1,
UseVersion => 1,
SortKeys => 1,
UseCode => 0,
# ... etc, see the YAML man page for more
},
}
}}});
likeβ¦ read the comments in there, they're doing the heavy lifting fr fr π«Ά
π¦ DESCRIPTION π¦
so Tangram::Type::Dump::YAML is basically the twin sister of Tangram::Type::Dump::Perl π― the only glow-up is that serialisation happens through YAML and not through Data::Dumper. that's the whole switch-up, no cap π
π okay real talk though: this is currently untested, and it is known to have bugs β mostly because YAML literally cannot serialise blessed references (see <http://rt.cpan.org/NoAuth/Bug.html?id=4784>). so likeβ¦ she's iconic but she's feral. handle with care bestie π
that's the whole page pookie πΈ this was perl v5.36.0, dated 2022-10-16, from the Tangra...p::YAML(3pm) manual, User Contributed Perl Documentation energy the whole way through β¨ mwah, go forth and serialise responsibly π
π¦ where this page comes from
- ubuntu noble: libtangram-perl 2.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtangram-perl 2.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtangram-perl 2.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms