From: Tyler Riddle Date: Tue, 15 Jan 2013 21:35:45 +0000 (-0800) Subject: fix some typos in the log messages X-Git-Tag: v0.003001_01~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=commitdiff_plain;h=fb258df60473013795325e4607b24239ca9db0fc fix some typos in the log messages --- diff --git a/lib/Object/Remote/Connection.pm b/lib/Object/Remote/Connection.pm index 307cde3..6c10d45 100644 --- a/lib/Object/Remote/Connection.pm +++ b/lib/Object/Remote/Connection.pm @@ -106,10 +106,20 @@ sub BUILD { } sub is_valid { my ($self) = @_; - my $closed = $self->on_close->is_ready; + my $valid = ! $self->on_close->is_ready; - log_trace { "Connection closed: $closed" }; - return ! $closed; + log_trace { + my $id = $self->_id; + my $text; + if ($valid) { + $text = 'yes'; + } else { + $text = 'no'; + } + "Connection '$id' is valid: '$text'" + }; + + return $valid; } sub _fail_outstanding { @@ -269,7 +279,7 @@ sub connect { sub remote_sub { my ($self, $sub) = @_; my ($pkg, $name) = $sub =~ m/^(.*)::([^:]+)$/; - Dlog_debug { "Invoking remote sub '$sub' for connection $_" } $self->_id; + Dlog_debug { "Invoking remote sub '$sub' for connection '$_'" } $self->_id; return await_future($self->send_class_call(0, $pkg, can => $name)); } diff --git a/lib/Object/Remote/Handle.pm b/lib/Object/Remote/Handle.pm index de25a6c..8e01b85 100644 --- a/lib/Object/Remote/Handle.pm +++ b/lib/Object/Remote/Handle.pm @@ -60,7 +60,7 @@ sub call { log_trace { "call('$method') has been invoked on remote handle '$id'; creating future" }; future { - log_debug { "Invoking send on connection for handle '$id' method $method" }; + log_debug { "Invoking send on connection for handle '$id' method '$method'" }; $self->connection->send(call => $id, $w, $method, @args) }; } diff --git a/lib/Object/Remote/MiniLoop.pm b/lib/Object/Remote/MiniLoop.pm index 9686bde..8945376 100644 --- a/lib/Object/Remote/MiniLoop.pm +++ b/lib/Object/Remote/MiniLoop.pm @@ -126,7 +126,7 @@ sub _next_timer_expires_delay { return $delay_max unless @$timers; my $duration = $timers->[0]->[0] - time; - log_trace { "next timer fires in '$duration' seconds " }; + log_trace { "next timer fires in '$duration' seconds" }; if ($duration < 0) { $duration = 0; @@ -161,7 +161,7 @@ sub loop_once { # differentiate between an error and a timeout. # -- no, love, mst. - log_trace { "Reading from all ready filehandles" }; + log_trace { "Reading from ready filehandles" }; foreach my $fh (@$readable) { next unless $read->{$fh}; $read_count++; @@ -170,7 +170,7 @@ sub loop_once { #under load last; } - log_trace { "Writing to all ready filehandles" }; + log_trace { "Writing to ready filehandles" }; foreach my $fh (@$writeable) { next unless $write->{$fh}; $write_count++;