KiokuD...::Data(3pm)
β¨ KiokuDB::Role::Upgrade::Data β¨
okay bestie, so this is a page from the User Contributed Perl Documentation section of the manual (that's the <3pm> part, iykyk) π
and it's literally all about a role that lets your classes handle their own data upgrades. no cap.
πΈ NAME πΈ
KiokuDB::Role::Upgrade::Data β classes that provide their own upgrade routine. periodt. π
π VERSION π
version 0.57 β¨
π¦ SYNOPSIS π¦
okay so this is the vibe, fr fr:
with qw(KiokuDB::Role::Upgrade::Data);
sub kiokudb_upgrade_data {
my ( $class, %args ) = @_;
# convert the data from the old version of the class to the new version
# as necessary
$args{entry}->derive(
class_version => our $VERSION,
...
);
}
like. you consume the role, you write kiokudb_upgrade_data, and you're the main character of your own data conversion. π
π DESCRIPTION π
This class lets you take complete control of the data conversion process. like, all of it. the whole thing. π«Ά
heads up though: with this approach there is only one handler per class, not one handler per version. so it's giving "one big function to rule them all" energy, not "a lil function for every version" energy. π
If you want something a bit more DWIM (aka "do what I mean, bestie"), go peek at KiokuDB::Role::Upgrade::Handlers::Table. and for even more of the details, KiokuDB::TypeMap::Entry::MOP is where it's at. π
π AUTHOR π
Yuval Kogman <nothingmuch@woobling.org> β iconic, we stan. π
π 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. β¨
and that's the whole page bestie!! this was perl v5.34.0, dated 2022-05-23, brought to you by the KiokuDB::Role::Upgrade::Data(3pm) manual page π mwah, go upgrade your data responsibly ππ¦
π¦ 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