X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote%2FMiniLoop.pm;h=cf572d69d62eaa9c29d93f7274c4ddc0ffb0f9bf;hb=455d031ccaa22069757d53cac1e90fda622b80d0;hp=5be3100fa29a1c075c937ef77ea0da0e84f7c92d;hpb=353556c4b81bcb3a0c3fff934eff5ab2f19733d4;p=scpubgit%2FObject-Remote.git diff --git a/lib/Object/Remote/MiniLoop.pm b/lib/Object/Remote/MiniLoop.pm index 5be3100..cf572d6 100644 --- a/lib/Object/Remote/MiniLoop.pm +++ b/lib/Object/Remote/MiniLoop.pm @@ -2,11 +2,12 @@ package Object::Remote::MiniLoop; use IO::Select; use Time::HiRes qw(time); -use Object::Remote::Logging qw( :log :dlog ); +use Object::Remote::Logging qw( :log :dlog router ); use Moo; -# this is ro because we only actually set it using local in sub run +BEGIN { router()->exclude_forwarding } +# this is ro because we only actually set it using local in sub run has is_running => (is => 'ro', clearer => 'stop'); #maximum duration that select() will block - undef means indefinite, #0 means no blocking, otherwise maximum time in seconds @@ -93,9 +94,9 @@ sub watch_time { } elsif (exists($watch{after})) { $at = time() + $watch{after}; } elsif (exists($watch{at})) { - $at = $watch{at}; + $at = $watch{at}; } else { - die "watch_time requires every, after or at"; + die "watch_time requires every, after or at"; } die "watch_time requires code" unless my $code = $watch{code}; @@ -108,7 +109,7 @@ sub watch_time { sub unwatch_time { my ($self, $id) = @_; - log_debug { "Removing timer with id of '$id'" }; + log_trace { "Removing timer with id of '$id'" }; @$_ = grep !($_ eq $id), @$_ for $self->_timers; return; }