NAME

Async::Redis::Script - Reusable Lua script wrapper

SYNOPSIS

my $script = $redis->script(<<'LUA');
    local current = redis.call('GET', KEYS[1]) or 0
    return current + ARGV[1]
LUA

# Call with keys and args
my $result = await $script->call_with_keys(1, 'mykey', 10);

# Or simple call (assumes no KEYS, all ARGV)
my $result = await $script->call('arg1', 'arg2');

DESCRIPTION

Script objects wrap Lua scripts for reuse. They:

- Compute and cache the SHA1 hash - Use EVALSHA for efficiency - Automatically fall back to EVAL on NOSCRIPT - Apply key prefixing for KEYS arguments