This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use MojoX::Redis 0.8; | |
my $redis1 = MojoX::Redis->new(); | |
$redis1->sadd("set1" => "foo")->set("foo" => "foo desc") | |
->sadd("set1" => "bar")->set("bar" => "bar desc") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use MojoX::Redis; | |
my $redis1 = MojoX::Redis->new(); | |
$redis1->sadd("set1" => "foo")->set("foo" => "foo desc") | |
->sadd("set1" => "bar")->set("bar" => "bar desc")->quit(sub { shift->stop }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add "get_board_info" helper | |
$app->helper( | |
get_board_info => sub { | |
my $c = shift; | |
my $data_id = shift; | |
my @keys = @_; | |
my $aecv = AE::cv; | |
my %data; | |
$aecv->begin (sub { shift->send(\%data) }); # Outer CV |