#!/usr/bin/perl
use warnings;
use strict;
use AnyEvent::Redis;

our ( $redis_host, $redis_port );
require 'config.pl';

my $channel = $ARGV[0] || die "usage: $0 channel\n";

my $sub = AnyEvent::Redis->new( host => $redis_host, port => $redis_port );

my $sub_cv = $sub->psubscribe($channel, sub {
	my($message, $chan) = @_;
	warn "# $chan | $message\n";
});

AnyEvent->condvar->recv;

