From: Tyler Riddle Date: Mon, 15 Oct 2012 17:21:25 +0000 (-0700) Subject: remove old debugging code; fix ::ModuleSender not returning code from ::FromData X-Git-Tag: v0.003001_01~97 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1f10b7944d395e404beb995813271d857d143f7;p=scpubgit%2FObject-Remote.git remove old debugging code; fix ::ModuleSender not returning code from ::FromData --- diff --git a/lib/Object/Remote/Connection.pm b/lib/Object/Remote/Connection.pm index 320a42b..4fc7305 100644 --- a/lib/Object/Remote/Connection.pm +++ b/lib/Object/Remote/Connection.pm @@ -55,8 +55,6 @@ END { kill(1, -2); } -our $DEBUG = !!$ENV{OBJECT_REMOTE_DEBUG}; - has _id => ( is => 'ro', required => 1, default => sub { our $NEXT_CONNECTION_ID++ } ); has send_to_fh => ( @@ -355,7 +353,6 @@ sub _serialize { local our @New_Ids = (-1); return eval { my $flat = $self->_encode($self->_deobjectify($data)); - warn "$$ >>> ${flat}\n" if $DEBUG; $flat; } || do { my $err = $@; # won't get here if the eval doesn't die @@ -421,7 +418,6 @@ sub _deobjectify { sub _receive { my ($self, $flat) = @_; - warn "$$ <<< $flat\n" if $DEBUG; Dlog_trace { my $l = length($flat); "Starting to deserialize $l characters of data for connection $_" } $self->_id; my ($type, @rest) = eval { @{$self->_deserialize($flat)} } or do { warn "Deserialize failed for ${flat}: $@"; return }; diff --git a/lib/Object/Remote/ModuleSender.pm b/lib/Object/Remote/ModuleSender.pm index 4b8be9b..6624d6b 100644 --- a/lib/Object/Remote/ModuleSender.pm +++ b/lib/Object/Remote/ModuleSender.pm @@ -20,7 +20,7 @@ sub source_for { log_debug { "locating source for module '$module'" }; if (my $find = Object::Remote::FromData->can('find_module')) { if (my $source = $find->($module)) { - Dlog_trace { "Object::Remote::FromData->find_module('$module') returned '$_'" } $source; + Dlog_trace { "source of '$module' was found by Object::Remote::FromData" }; return $source; } } diff --git a/lib/Object/Remote/Role/Connector/PerlInterpreter.pm b/lib/Object/Remote/Role/Connector/PerlInterpreter.pm index 5bf2f96..5406428 100644 --- a/lib/Object/Remote/Role/Connector/PerlInterpreter.pm +++ b/lib/Object/Remote/Role/Connector/PerlInterpreter.pm @@ -198,8 +198,6 @@ sub fatnode_text { $text = "my \$WATCHDOG_TIMEOUT = undef;\n"; } - $text .= 'BEGIN { $ENV{OBJECT_REMOTE_DEBUG} = 1 }'."\n" - if $ENV{OBJECT_REMOTE_DEBUG}; $text .= <<'END'; $INC{'Object/Remote/FatNode.pm'} = __FILE__; $Object::Remote::FatNode::DATA = <<'ENDFAT';