KiokuD...e::API(3pm)

πŸ“¦
version 0.57 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– KiokuDB::Role::API β€” the manual page, but make it cute πŸ’–

okay so bestie, you found the docs for KiokuDB::Role::API (it's a Perl module page, the 3pm kind, from the User Contributed Perl Documentation section) and honestly? it's a little one, but it's a mighty little one. sit down, grab a strawberry πŸ“, let's get into it.


✨ VERSION ✨

version 0.57 β€” that's the one, that's the vibe, no cap.


🌸 SYNOPSIS 🌸

this is the whole point of the role, look:

has directory => (
    isa => "KiokuDB",
    handles => "KiokuDB::Role::API",
);

like. that's it. that's the slay. one handles and suddenly your attribute is doing all the work. main character energy fr fr πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so what is this thing actually doing? it's a role, and it drops in requires declarations for all the runtime methods of KiokuDB. why do we care? because that's literally how you set up delegations, bestie. it's giving "I'll hold the shape, you hold the object."

and it's not just a theory situation β€” it's used in, for example, KiokuX::User. iconic behavior honestly.


πŸ’… METHODS πŸ’…

here's the full list of what this role declares, and we are not skipping a single one, not even the one that shows up twice (and yes, new_scope really does appear twice in the original list β€” we respect the canon πŸ™ˆ):

  • new_scope
  • txn_do
  • lookup
  • exists
  • store
  • insert
  • update
  • deep_update
  • delete
  • is_root
  • set_root
  • unset_root
  • search
  • all_objects
  • root_set
  • grep
  • scan
  • clear_live_objects
  • new_scope
  • object_to_id
  • objects_to_ids
  • id_to_object
  • ids_to_objects
  • live_objects
  • directory

πŸŽ€ directory πŸŽ€

and this one gets its own little spotlight, because it's special:

the directory method is the one you use to fetch the actual KiokuDB delegate. and here's the cute part β€” it works no matter how deeply it is nested. deeply nested? doesn't matter. directory will find it. she's resourceful like that. 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Yuval Kogman <nothingmuch@woobling.org> β€” thank you for your service, king.


this software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.

and it's free software, babes β€” you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. open source realness. we love to see it. 🫢


k that's the whole page bestie, go forth and delegate responsibly ✨

and a lil sign-off for the record books: this page is from perl v5.34.0, dated 2022-05-23, and it's filed under KiokuDB::Role::API(3pm). mwah. πŸ’–πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from