
AnyEvent::Campfire::Stream

version 0.0.3

use AnyEvent::Campfire::Stream;
my $stream = AnyEvent::Campfire::Stream->new(
token => 'xxx',
rooms => '1234', # hint: room id is in the url
# seperated by comma `,`
);
$stream->on('stream', sub {
my ($s, $data) = @_; # $s is $stream
print "$data->{id}: $data->{body}\n";
});
$stream->on('error', sub {
my ($s, $error) = @_;
print STDERR "$error\n";
});


Hyungsuk Hong <hshong@perl.kr>

This software is copyright (c) 2012 by Hyungsuk Hong.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.