X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote%2FWatchDog.pm;fp=lib%2FObject%2FRemote%2FWatchDog.pm;h=7e4d1fed52c1ae0a7fc6d58affc39bdf3574ebcc;hb=5add5e29851e82862e4d8f6d67dfce559f6685ce;hp=3d47ac485d3cecd97903421c80c8675a3df718d2;hpb=d2eadebbdb4416f421ffd5298c782fdc32f388e7;p=scpubgit%2FObject-Remote.git diff --git a/lib/Object/Remote/WatchDog.pm b/lib/Object/Remote/WatchDog.pm index 3d47ac4..7e4d1fe 100644 --- a/lib/Object/Remote/WatchDog.pm +++ b/lib/Object/Remote/WatchDog.pm @@ -1,18 +1,20 @@ package Object::Remote::WatchDog; use Object::Remote::MiniLoop; -use Object::Remote::Logging qw ( :log :dlog ); +use Object::Remote::Logging qw (:log :dlog router); use Moo; has timeout => ( is => 'ro', required => 1 ); +BEGIN { router()->exclude_forwarding; } + around new => sub { my ($orig, $self, @args) = @_; our ($WATCHDOG); return $WATCHDOG if defined $WATCHDOG; log_trace { "Constructing new instance of global watchdog" }; - return $WATCHDOG = $self->$orig(@args); + return $WATCHDOG = $self->$orig(@args); }; #start the watchdog