Redis::Key - wrapper class of Redis' key
use Redis; use Redis::Key; my $redis = Redis->new; # basic usage my $key = Redis::Key->new(redis => $redis, key => 'hoge'); $key->set('fuga'); # => $redis->set('hoge', 'fuga'); print $key->get; # => $redis->get('hoge'); # bind my $key_unbound = Redis::Key->new(redis => $redis, key => 'hoge:{fugu}:piyo', need_bind => 1); my $key_fugu = $key_unbound->bind(fugu => 'FUGU'); $key_fugu->set('foobar'); # => $redis->set('hoge:FUGU:piyo', 'foobar'); my @keys = $key_unbound->keys; # => $redis->keys('hoge:*:piyo');
Redis::Key is a wrapper class of Redis' keys.
Ichinose Shogo <shogo82148@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Redis::Key, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Redis::Key
CPAN shell
perl -MCPAN -e shell install Redis::Key
For more information on module installation, please visit the detailed CPAN module installation guide.