Bot::B...:Memory(3pm)

πŸ“¦
version 1.30 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

Bot::BasicBot::Pluggable::Store::Memory πŸ’Ύβœ¨

okay bestie, welcome to the manual page for Bot::BasicBot::Pluggable::Store::Memory β€” the User Contributed Perl Documentation girlie. It's a storage backend. It lives in RAM. It's giving very "short-term memory, zero commitment" and honestly? iconic. πŸ§ πŸ’…


🌸 VERSION 🌸

version 1.30


✨ SYNOPSIS ✨

my $store = Bot::BasicBot::Pluggable::Store::Memory->new();
$store->set( "namespace", "key", "value" );

like. that's it. that's the whole vibe. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

So this is a Bot::BasicBot::Pluggable::Store that uses memory (RAM) to store the values your modules set. And lemme spell out the obvious because it matters, bestie: this means your data won't persist between invocations of your bot. Nope. Gone. Poof. πŸ«₯ So this one is mainly for testing and for storing data for a short time. Short-term relationship energy fr fr. πŸ’€

This module is just a bare bone subclass of Bot::BasicBot::Pluggable::Store and does not implement any methods of its own. No cap, not a single one. In a perfect world, Bot::BasicBot::Pluggable::Store would just be an abstract base class β€” but nope, it was implemented as normale in-memory storage class. πŸ™ˆ

The way that Bot::BasicBot::Pluggable object creation works, you can either specify an already created storage object, or a string that is simply appended to "Bot::BasicBot::Pluggable::Store::". So if you just want to use memory storage, you have to load it this way:

my $bot => Bot::BasicBot::Pluggable->new ( store => Bot::BasicBot::Pluggable::Store->new() );

Now you can use load it as any other storage module:

my $bot => Bot::BasicBot::Pluggable->new ( store => 'Memory' );

In this way we don't break any existing code. πŸŽ€ backwards compatible queen. periodt.


πŸ‘‘ AUTHOR πŸ‘‘

Mario Domgoergen <mdom@cpan.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


perl v5.40.0 Β· 2024-08-24 β€” and that's the whole page, bestie!! πŸ¦‹πŸ’– go forth and store things in RAM (temporarily!!) and remember: no persistence, no problem. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from