Redis::List(3pm)

πŸ“¦
version 2.000 Β· 7 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Redis::List πŸ’–

okay so bestie, welcome to Redis::List β€” she's a Perl module that ties Perl arrays to Redis lists. yes literally, your @array and your Redis list become the same thing. it's giving main character energy fr fr. πŸ¦‹


✨ VERSION ✨

this is version 2.000 babes, don't come at me with anything older πŸ’…


πŸŽ€ SYNOPSYS πŸŽ€

(ok so the original spells it "SYNOPSYS" and I'm respectfully keeping her iconic spelling, no cap)

here's the whole vibe, verbatim, do not touch:

tie @my_list, 'Redis::List', 'list_name', @Redis_new_parameters;

$value = $my_list[$index];
$my_list[$index] = $value;

$count = @my_list;

push @my_list, 'values';
$value = pop @my_list;
unshift @my_list, 'values';
$value = shift @my_list;

## NOTE: fourth parameter of splice is *NOT* supported for now
@other_list = splice(@my_list, 2, 3);

@my_list = ();

so like, you tie the array to a Redis list name, and then everything you already know and love just... works?? get element, set element, count with @my_list, push, pop, unshift, shift, splice (three args only bestie!!) and @my_list = () to clear her out. iconic behaviour honestly 🫢

🚨 not me warning you about splice: the fourth parameter of splice is NOT supported for now. that is not a vibe, that is a hard limit. the original says it, I say it, we all say it together. πŸ’€

πŸ‘‘ AUTHORS πŸ‘‘

the legends who made this happen:

  • Pedro Melo <melo@cpan.org>
  • Damien Krotkine <dams@cpan.org>

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!! this was written against perl v5.36.0 and the page is dated 2023-01-14 β€” so if you're reading this from the future, hiiiii, hope your Redis lists are thriving 🌈⭐ stay slay, keep your arrays tied, and remember: three args on splice, always. mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from