From: Tyler Riddle Date: Tue, 27 Nov 2012 01:41:38 +0000 (-0800) Subject: forward OBJECT_REMOTE_PERL_BIN env var; doc fix for logging; add TODO for left over... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52a81cdefbfd6dcd08b4f8f95a9d17e97118bd2d;p=scpubgit%2FObject-Remote.git forward OBJECT_REMOTE_PERL_BIN env var; doc fix for logging; add TODO for left over object bug --- diff --git a/lib/Object/Remote/Connection.pm b/lib/Object/Remote/Connection.pm index 483be8f..f670f48 100644 --- a/lib/Object/Remote/Connection.pm +++ b/lib/Object/Remote/Connection.pm @@ -283,6 +283,9 @@ sub register_remote { sub send_free { my ($self, $id) = @_; Dlog_trace { "sending request to free object '$id' for connection $_" } $self->_id; + #TODO this shows up some times when a remote side dies in the middle of a remote + #method invocation - possibly only when the object is being constructed? + #(in cleanup) Use of uninitialized value $id in delete at ../Object-Remote/lib/Object/Remote/Connection. delete $self->remote_objects_by_id->{$id}; $self->_send([ free => $id ]); } diff --git a/lib/Object/Remote/FatNode.pm b/lib/Object/Remote/FatNode.pm index 3a7025c..bdf094b 100644 --- a/lib/Object/Remote/FatNode.pm +++ b/lib/Object/Remote/FatNode.pm @@ -100,6 +100,10 @@ if (defined($ENV{OBJECT_REMOTE_LOG_FORWARDING})) { my $forwarding = $ENV{OBJECT_REMOTE_LOG_FORWARDING}; $env_pass .= '$ENV{OBJECT_REMOTE_LOG_FORWARDING} = "' . $forwarding . "\";\n"; } +if (defined($ENV{OBJECT_REMOTE_PERL_BIN})) { + my $perl_bin = $ENV{OBJECT_REMOTE_PERL_BIN}; + $env_pass .= '$ENV{OBJECT_REMOTE_PERL_BIN} = "' . $perl_bin . "\";\n"; +} my $start = stripspace <<'END_START'; # This chunk of stuff was generated by Object::Remote::FatNode. To find diff --git a/lib/Object/Remote/Logging.pm b/lib/Object/Remote/Logging.pm index 0cc02d7..e4e740e 100644 --- a/lib/Object/Remote/Logging.pm +++ b/lib/Object/Remote/Logging.pm @@ -136,7 +136,7 @@ Object::Remote::Logging - Logging subsystem for Object::Remote $ENV{OBJECT_REMOTE_LOG_FORMAT} = '%l %t: %p::%m %s'; #and more $ENV{OBJECT_REMOTE_LOG_SELECTIONS} = 'Object::Remote::Logging Some::Other::Subclass'; $ENV{OBJECT_REMOTE_LOG_SELECTIONS} = '* -Object::Remote::Logging'; - $ENV{OBJECT_REMOTE_LOG_FORWARDING} = 0 || 1; #default 0 + $ENV{OBJECT_REMOTE_LOG_FORWARDING} = 1; #default 0 log_info { 'Trace log event' }; Dlog_verbose { "Debug event with Data::Dumper::Concise: $_" } { foo => 'bar' }; @@ -228,7 +228,7 @@ to the block as the argument list and returned from the log method as a list. Works just like log_ and Dlog_ except returns only the first argument as a scalar value. - my $beverage = log_info { "Customer ordered $_[0]" } 'Coffee'; + my $beverage = logS_info { "Customer ordered $_[0]" } 'Coffee'; =back