$self->_sock_send( 'MOVE', $key, $dbindex );
}
$self->_sock_send( 'MOVE', $key, $dbindex );
}
+=head2 flushdb
+
+ $r->flushdb;
+
+=cut
+
+sub flushdb {
+ my $self = shift;
+ $self->_sock_send_ok('FLUSHDB');
+}
+
+=head2 flushall
+
+ $r->flushall;
+
+=cut
+
+sub flushall {
+ my $self = shift;
+ $self->_sock_send_ok('flushall');
+}
+
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
use warnings;
use strict;
use warnings;
use strict;
-use Test::More tests => 92;
+use Test::More tests => 94;
ok( $o->select( 1 ), 'select' );
ok( $o->exists( 'foo' ), 'exists' );
ok( $o->select( 1 ), 'select' );
ok( $o->exists( 'foo' ), 'exists' );
+ok( $o->flushdb, 'flushdb' );
+cmp_ok( $o->dbsize, '==', 0, 'empty' );
+
diag "Connection handling";
ok( $o->quit, 'quit' );
diag "Connection handling";
ok( $o->quit, 'quit' );