Created
October 7, 2009 11:20
-
-
Save yaotti/203973 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 AnyEvent::Twitter::Stream; | |
use Config::Pit; | |
my $config = pit_get("twitter.com"); | |
my $cv = AnyEvent->condvar; | |
my $listenier = AnyEvent::Twitter::Stream->new( | |
username => $config->{username}, | |
password => $config->{password}, | |
method => "filter", | |
track => "perl,emacs", | |
on_tweet => sub { | |
my $tweet = shift; | |
warn "$tweet->{user}{screen_name}: $tweet->{text}\n"; | |
}, | |
on_eof => $cv, | |
); | |
$cv->recv; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment