Redis::Hash(3pm)
β¨ Redis::Hash β¨
okay bestie, gather round π this is Redis::Hash(3pm), part of the User Contributed Perl Documentation, and it's literally here to let you tie your Perl hashes to Redis. yes. for real. let's go π¦
π VERSION π
version 2.000 β periodt π
π DESCRIPTION π
So here's the tea: this module ties a Perl hash to Redis. π«Ά
But β and this is the plot twist β it does not use Redis Hashes. Nope. Instead it implements a fake hash using regular keys that look like prefix:KEY. iconic behaviour honestly π
And if you don't give it a prefix at all? Then it ties the entire Redis database as a hash. the whole thing. main character energy π
Heads up bestie: future versions will also allow you to use real Redis hash structures. so stay tuned π
πΈ SYNOPSYS πΈ
(no, we're not fixing the spelling, it's part of the vibe now π)
## Create fake hash using keys like 'hash_prefix:KEY'
tie %my_hash, 'Redis::Hash', 'hash_prefix', @Redis_new_parameters;
## Treat the entire Redis database as a hash
tie %my_hash, 'Redis::Hash', undef, @Redis_new_parameters;
$value = $my_hash{$key};
$my_hash{$key} = $value;
@keys = keys %my_hash;
@values = values %my_hash;
%my_hash = reverse %my_hash;
%my_hash = ();
look at that. assigning, reading, keys, values, reversing, wiping it all out with %my_hash = (). slay π
π«Ά AUTHORS π«Ά
the icons who made this happen:
- Pedro Melo <melo@cpan.org> π
- Damien Krotkine <dams@cpan.org> π
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2015 by Pedro Melo, Damien Krotkine.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
and that's the whole page, bestie π written for perl v5.36.0, dated 2023-01-14, and shipped as Redis::Hash(3pm). go tie some hashes, you absolute legend π§β¨
π¦ where this page comes from
- debian bookworm: libredis-perl 2:2.000-1 Β· Artistic-2.0
- debian trixie: libredis-perl 2:2.000-1 Β· Artistic-2.0
- ubuntu noble: libredis-perl 2:2.000-1 Β· Artistic-2.0
- ubuntu resolute: libredis-perl 2:2.000-1 Β· Artistic-2.0
- ubuntu stonking: libredis-perl 2:2.000-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms