Permalink
Browse files

use VHS.pm

  • Loading branch information...
1 parent 3b0a97a commit 36791f2ac48ecd03d809fda942982c24a53ab1ec @lukec lukec committed Aug 5, 2009
Showing with 5 additions and 6 deletions.
  1. +5 −6 bin/arduino-daemon
View
@@ -1,15 +1,14 @@
#!/usr/bin/perl
use strict;
use warnings;
-use AnyEvent::Twitter::Stream;
-use YAML qw/LoadFile/;
use FindBin;
+use lib "$FindBin::Bin/../lib";
+use VHS;
+use AnyEvent::Twitter::Stream;
use Fatal qw/open close/;
use Parallel::ForkManager;
my $arduino_file = '/dev/ttyUSB0';
-my $vhs_config_file = "$FindBin::Bin/../.vhs.yaml";
-my $VHS = LoadFile($vhs_config_file);
my $done = AnyEvent->condvar;
my $forkmanager = Parallel::ForkManager->new(1);
@@ -38,8 +37,8 @@ my $to_arduino_event = sub {
}
};
my $streamer = AnyEvent::Twitter::Stream->new(
- username => $VHS->{twitter_username},
- password => $VHS->{twitter_password},
+ username => VHS->config->{twitter_username},
+ password => VHS->config->{twitter_password},
method => 'follow',
follow => '61112230',
on_tweet => $to_arduino_event,

0 comments on commit 36791f2

Please sign in to comment.