Changeset 7424a5b for lib/BarnOwl/Module/Twitter
- Timestamp:
- Oct 28, 2009, 11:13:05 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- e4951ea
- Parents:
- d69c37c
- git-author:
- Nelson Elhage <nelhage@mit.edu> (10/06/09 23:11:25)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (10/28/09 23:13:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/BarnOwl/Module/Twitter/Handle.pm
rd69c37c r7424a5b 16 16 use Net::Twitter::Lite; 17 17 use HTML::Entities; 18 19 use Scalar::Util qw(weaken); 18 20 19 21 use BarnOwl; … … 107 109 my $delay = shift; 108 110 111 my $weak = weaken($self); 112 109 113 if($self->{cfg}->{poll_for_tweets}) { 110 114 $self->{timer} = BarnOwl::Timer->new({ 111 115 after => $delay, 112 116 interval => 60, 113 cb => sub { $ self->poll_twitter}117 cb => sub { $weak->poll_twitter if $weak } 114 118 }); 115 119 } … … 119 123 after => $delay, 120 124 interval => 120, 121 cb => sub { $ self->poll_direct}125 cb => sub { $weak->poll_direct if $weak } 122 126 }); 123 127 }
Note: See TracChangeset
for help on using the changeset viewer.