$self->_sock_send_ok( 'SAVE' );
}
+=head2 bgsave
+
+ $r->bgsave;
+
+=cut
+
+sub bgsave {
+ my $self = shift;
+ $self->_sock_send_ok( 'BGSAVE' );
+}
+
+=head2 lastsave
+
+ $r->lastsave;
+
+=cut
+
+sub lastsave {
+ my $self = shift;
+ $self->_sock_send( 'LASTSAVE' );
+}
+
+=head2 shutdown
+
+ $r->shutdown;
+
+=cut
+
+sub shutdown {
+ my $self = shift;
+ $self->_sock_send( 'SHUTDOWN' );
+}
+
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
use warnings;
use strict;
-use Test::More tests => 103;
+use Test::More tests => 106;
use lib 'lib';
ok( $o->set( 'test-undef' => 42 ), 'set test-undef' );
ok( $o->set( 'test-undef' => undef ), 'set undef' );
ok( ! defined $o->get( 'test-undef' ), 'get undef' );
-diag $o->exists( 'test-undef' );
ok( $o->exists( 'test-undef' ), 'exists undef' );
$o->del('non-existant');
diag "Persistence control commands";
ok( $o->save, 'save' );
-
+ok( $o->bgsave, 'bgsave' );
+ok( $o->lastsave, 'lastsave' );
+ok( $o->shutdown, 'shutdown' );
diag "Connection handling";