Async-Redis
view release on metacpan or search on metacpan
lib/Async/Redis/Script.pm view on Meta::CPAN
For explicit pipelines, register the script with C<define_command> and use
C<< $pipeline->run_script($name, ...) >>.
=head2 call
my $result = await $script->call(@args);
Legacy method. Assumes all arguments are ARGV (no KEYS).
Equivalent to C<< $script->run([], \@args) >>.
=head2 call_with_keys
my $result = await $script->call_with_keys($numkeys, @keys_and_args);
Legacy method. First C<$numkeys> arguments are KEYS, rest are ARGV.
=head1 ACCESSORS
=head2 sha
my $sha1 = $script->sha;
Returns the SHA1 hex digest of the script (lowercase).
=head2 script
my $lua = $script->script;
Returns the Lua source code.
=head2 name
my $name = $script->name;
Returns the command name (if registered via define_command).
=head2 num_keys
my $n = $script->num_keys;
Returns the expected number of keys, or 'dynamic' if variable.
=head2 description
my $desc = $script->description;
Returns the description string (if provided).
=head2 redis
my $redis = $script->redis;
Returns the default Redis connection associated with the script, if any.
=head1 EVALSHA OPTIMIZATION
Scripts automatically use EVALSHA for efficiency. If the script isn't
cached on the Redis server (NOSCRIPT error), it falls back to EVAL
which also loads the script for future calls.
This is transparent - you don't need to manually load scripts.
=head1 SEE ALSO
L<Async::Redis> - Main client with C<script()> and C<define_command()> methods
=cut
( run in 1.168 second using v1.01-cache-2.11-cpan-ba708fea25c )