Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix make_error_handler() to use event objects.

Nick Perez pointed out that make_error_hanler() was using the old
style events.  I fixed that and a typo invoked by the error condition
in Reflex::Role::Connecting.
  • Loading branch information...
commit 789a130f73138ba063b59fccd4b05700d040ad32 1 parent 8c5b881
@rcaputo authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/Reflex/Callbacks.pm
  2. +1 −1  lib/Reflex/Role/Connecting.pm
View
4 lib/Reflex/Callbacks.pm
@@ -247,8 +247,8 @@ sub make_error_handler {
package_name => $caller,
name => $method_name,
body => sub {
- my ($self, $args) = @_;
- warn "$args->{errfun} error $args->{errnum}: $args->{errstr}\n";
+ my ($self, $event) = @_;
+ warn $event->formatted(), "\n";
$self->stopped();
},
);
View
2  lib/Reflex/Role/Connecting.pm
@@ -93,7 +93,7 @@ role {
$! = unpack('i', getsockopt($socket->handle(), SOL_SOCKET, SO_ERROR));
if ($!) {
$self->$cb_error(
- Reflex::Event::Error->(
+ Reflex::Event::Error->new(
_emitters => [ $self ],
number => ($!+0),
string => "$!",
Please sign in to comment.
Something went wrong with that request. Please try again.