Skip to content

Instantly share code, notes, and snippets.

@und3f
und3f / Author.pm
Created February 25, 2011 21:13 — forked from Meettya/Author.pm
package NoticeBackend::Author;
use Mojo::Base 'Mojolicious::Controller';
use 5.12.0;
use warnings;
use utf8;
use MojoX::Redis;
use Mojo::IOLoop;
#!/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")
#!/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 })
# 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