From: Tyler Riddle Date: Wed, 7 Nov 2012 03:48:01 +0000 (-0800) Subject: make weak reference to router connection optional X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=366d444b7dec7ce493fc19317cc7cd7d7f8b07ae;p=scpubgit%2FObject-Remote.git make weak reference to router connection optional --- diff --git a/lib/Object/Remote/Logging/Router.pm b/lib/Object/Remote/Logging/Router.pm index ee40377..838da82 100644 --- a/lib/Object/Remote/Logging/Router.pm +++ b/lib/Object/Remote/Logging/Router.pm @@ -74,7 +74,7 @@ sub handle_log_request { } sub connect { - my ($self, $destination) = @_; + my ($self, $destination, $is_weak) = @_; my $wrapped; if (ref($destination) ne 'CODE') { @@ -84,7 +84,7 @@ sub connect { } push(@{$self->_connections}, $wrapped); - weaken($self->_connections->[-1]); + weaken($self->_connections->[-1]) if $is_weak; } sub _clean_connections {