Skip to content

Commit

Permalink
Fix make_error_handler() to use event objects.
Browse files Browse the repository at this point in the history
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
rcaputo committed Apr 17, 2012
1 parent 8c5b881 commit 789a130
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Reflex/Callbacks.pm
Expand Up @@ -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();
},
);
Expand Down
2 changes: 1 addition & 1 deletion lib/Reflex/Role/Connecting.pm
Expand Up @@ -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 => "$!",
Expand Down

0 comments on commit 789a130

Please sign in to comment.