return split(/\s/, _sock_result_bulk());
}
+=head2 randomkey
+
+ my $key = $r->randomkey;
+
+=cut
+
+sub randomkey {
+ my ( $self, $glob ) = @_;
+ print $sock "RANDOMKEY\r\n";
+ _sock_result();
+}
+
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
use warnings;
use strict;
-use Test::More tests => 48;
+use Test::More tests => 49;
use lib 'lib';
cmp_ok( $o->keys('key-*'), '==', $key_next + 1, 'key-*' );
is_deeply( [ $o->keys('key-*') ], [ @keys ], 'keys' );
+ok( my $key = $o->randomkey, 'randomkey' );
+diag "key: $key";
+
ok( $o->quit, 'quit' );