KiokuD...::Clear(3pm)

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

πŸ’– NAME πŸ’–

okay bestie so this is KiokuDB::Backend::Role::Clear β€” it's a Perl manual page (a 3pm, aka a module doc), and it's the backend clearing api. yes, that's literally the whole job description. clearing. the api. for backends. iconic behavior honestly.


✨ VERSION ✨

version 0.57 β€” that's the one we're talking about, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

here's how you actually use it, and yes you do with it like a normal Moose role, don't be weird about it:

package KiokuDB::Backend::MySpecialBackend;
use Moose;

use namespace::clean -except => 'meta';

with qw(
    KiokuDB::Backend
    KiokuDB::Backend::Role::Clear
);

sub clear {
    ...
}

like. you consume both roles, you write your own clear, and the ... is doing so much heavy lifting there. that's the assignment. 🫢


🌸 DESCRIPTION 🌸

so this backend role hands you an api for removing all entries from a backend. wipe it. gone. bye. πŸ’…

and the tea is: this is optionally used by the dump loader script, plus some parts of the test suite. so it's not like, mandatory-mandatory, it's a "when you need it you need it" situation. iykyk.


πŸ‘‘ REQUIRED METHODS πŸ‘‘

you must implement this, bestie, there's no default and no vibes-based fallback:

  • clear β€” this method should clear all entries in the backend. that's it. that's the whole method. clear the entries. all of them. 🧹✨

🌈 AUTHOR 🌈

Yuval Kogman <nothingmuch@woobling.org> β€” shoutout to the author, the main character who wrote this. πŸ’œ


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. so like, go forth, remix responsibly, slay. πŸ¦‹


and that's the whole page fr fr β€” short and sweet, no notes. πŸ’–

generated for perl v5.34.0 on 2022-05-23 β€” bye bestie, go clear some backends πŸ’…βœ¨

πŸ“¦ where this page comes from