KiokuDB::Set(3pm)
π KiokuDB::Set β bestie edition π
okay so this is the manual page for KiokuDB::Set, a <pink>Set::Object</pink> wrapper for KiokuDB that comes with lazy loading β¨ (iykyk). Yes it's a Perl thing. Yes it's iconic. Sit down, we're doing this together π«Ά
β¨ VERSION β¨
version 0.57 β that's the one, bestie, that's the version we're talking about πΈ
π SYNOPSIS π
okay so here's the whole vibe in code form, no cap:
use KiokuDB::Util qw(set);
my $set = set(); # KiokuDB::Set::Transient
$set->insert($object);
warn $set->size;
my $id = $dir->store( $set );
look at her go π she's so simple and she's doing SO much.
π¦ DESCRIPTION π¦
so this role β a role, like a personality trait but for classes β defines the API that these three absolute queens implement:
KiokuDB::Set::TransientKiokuDB::Set::DeferredKiokuDB::Set::Loaded
all three are modeled after <purple>Set::Object</purple>, but with implementation details that are specific to KiokuDB. so like, same energy, different lore π
π Transient Sets π
Transient sets are in memory β they're sets you (the user) constructed yourself, just chilling, waiting for their subsequent insertion into storage. it's giving "packed and ready to move" π§³
When you create a new set, this is what you should use. periodt.
KiokuDB::Util provides convenience functions to construct transient sets concisely β specifically <cyan>set</cyan> (in KiokuDB::Util) and <cyan>weak_set</cyan> (in KiokuDB::Util). so you don't have to do it the long way, bestie πΈ
π Deferred Sets π
when a set is loaded from the backend, it is deferred by default. what does that mean? it means the objects inside the set are not yet loaded, and they will be fetched only as needed. she's playing hard to get, respectfully π
and then β when the set members are actually needed β the set gets upgraded in place into a KiokuDB::Set::Loaded object. glow up, literally β¨
π Loaded Sets π
this is the result of vivifying the members of a deferred set. and implementation-wise? she's similar to transient sets. same vibe, different chapter π
π AUTHOR π
Yuval Kogman <nothingmuch@woobling.org> β the legend, the moment, the main character π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, honestly π«Ά
and that's the whole page, bestie π this was KiokuDB::Set, perl v5.34.0, dated 2022-05-23, from the User Contributed Perl Documentation, and you understood every single bit of it. iconic behavior, no notes πβπ
π¦ 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