Redis:...t::Hash(3pm)

πŸ’– NAME πŸ’–

Redis::Fast::Hash β€” the glow-up where you tie Perl hashes to Redis hashes. Bestie, this is the page Redis:...t::Hash(3pm) from the User Contributed Perl Documentation, and yes we're doing this whole thing in group-chat voice. No cap. πŸ¦‹


✨ SYNOPSYS ✨

keeping the spelling exactly as the original gave it to us, periodt πŸ’…

Okay so here's the vibe. First up, the fake-hash mode where every key gets a little prefix on it:

## Create fake hash using keys like 'hash_prefix:KEY'
tie %my_hash, 'Redis::Fast::Hash', 'hash_prefix', @Redis_new_parameters;

Orrrr the girlboss mode where the ENTIRE Redis database is your hash, no prefix, no boundaries, main character energy:

## Treat the entire Redis database as a hash
tie %my_hash, 'Redis::Fast::Hash', undef, @Redis_new_parameters;

Reading and writing, the basics, we love her:

$value = $my_hash{$key};
$my_hash{$key} = $value;

Grabbing all the keys and all the values at once:

@keys   = keys %my_hash;
@values = values %my_hash;

Reversing the whole thing, iconic behaviour honestly:

%my_hash = reverse %my_hash;

And the total reset, everything gone, we don't talk about her:

%my_hash = ();

🌸 DESCRIPTION 🌸

This module ties a Perl hash to Redis::Fast. Obsessed. But real talk β€” the important little detail here: it does not use Redis Hashes. Nope. It implements a fake hash using regular keys that look like prefix:KEY. So it's giving hash... but the keys know the truth. 😭

If you don't hand it a prefix, it will tie the entire Redis database as a hash. The whole thing. Your whole database. As a hash. Lowkey terrifying, highkey slay. πŸ‘‘

Future versions will also allow you to use real Redis hash structures. So if that's your dream, hold on, it's coming. 🫢


πŸŽ€ one more thing bestie πŸŽ€

This page came to you from the User Contributed Perl Documentation, running perl v5.42.3, dated 2026-08-20. Go tie a hash, drink some water, and remember: the prefix is load-bearing. πŸ’–βœ¨

πŸ“¦ where this page comes from