KiokuD...utable(3pm)
π KiokuDB::Role::Immutable π
okay so bestie, welcome to the manual page for KiokuDB::Role::Immutable β a Perl role from the KiokuDB universe, filed under User Contributed Perl Documentation. it's giving "I will literally never change and that's on purpose". let's get into it π¦
β¨ NAME β¨
KiokuDB::Role::Immutable β a role for objects that are never updated. periodt. no takebacks, no glow-ups, no edits. π
πΈ VERSION πΈ
version 0.57 β yeah she's got a version number, we love a documented queen π
π SYNOPSIS π
so you just roll it into your class like this:
with qw(KiokuDB::Role::Immutable);
that's it. that's the whole vibe. you with it and now your object is β¨frozenβ¨ (conceptually, not literally, keep reading bestie). π§
π DESCRIPTION π
okay so here's the tea β β this is a role for objects that are never updated after they are inserted to the database. once they're in, they're in. no cap.
the way that this works is lowkey iconic: the object gets skipped entirely on all update/store operations β unless it's being collapsed for the first time. and its child objects? those won't get updated either, unless they're found while collapsing another object. so like, the immutability kinda radiates outward. π
and this means that (and I cannot stress this enough, bestie, write this down):
my $immutable = $kiokudb->lookup($id);
$immutable->child->name("foo");
$kiokudb->update($immutable);
this will NOT work. π the update just bounces right off your immutable little guy. it's giving "talking to a wall" energy. π
so what do you do instead? you gotta update the child directly, like this:
$kiokudb->update($immutable->child);
yeah. you go straight to the source. the parent is not your messenger, she does not pass notes. π«Ά
π AUTHOR π
Yuval Kogman <nothingmuch@woobling.org> β the icon, the legend, the one who wrote this. bow down π
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive. π
it's free software, bestie β you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth and share, responsibly. β¨
and that's the whole page, babe! π this beauty came from the perl v5.34.0 docs, dated 2022-05-23, and if you ever see the header or footer around, it's KiokuD...utable(3pm) β yes the title got truncated, it's fine, we don't talk about it π. now go forth and never update your objects. slay π
π¦πΈ
π¦ where this page comes from
- debian bookworm: libkiokudb-perl 0.57-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libkiokudb-perl 0.57-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libkiokudb-perl 0.57-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libkiokudb-perl 0.57-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms