root/lang/perl/Spread-DStorage/trunk/examples/client.pl @ 10933

Revision 10933, 393 bytes (checked in by fujiwara, 5 years ago)

initial import

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2use strict;
3use Spread::DStorage::Client;
4$| = 1;
5
6my $client = Spread::DStorage::Client->new;
7print "> ";
8while (<>) {
9    chomp;
10    if ( /^set (.+?) (.+)$/i ) {
11        print ">> ", $client->set( $1 => $2 ), "\n";
12    }
13    elsif ( /^get (.+?)$/i ) {
14        print ">> ", $client->get($1), "\n";
15    }
16    else {
17        print "invalid command\n";
18    }
19    print "\n> ";
20}
Note: See TracBrowser for help on using the browser.