Subject: | Test failures with IO::Async 0.53 |
Looks like this might need updating for Mojolicious 3.57:
t/00use.t ........... ok
Method "io" not implemented by subclass at /home/tom/.cpan/build/IO-
Async-Loop-Mojo-0.02-Y8KNHz/blib/lib/IO/Async/Loop/Mojo.pm line 92.
# Looks like you planned 21 tests but ran 3.
# Looks like your test exited with 29 just after 3.
t/01loop-io.t .......
Dubious, test returned 29 (wstat 7424, 0x1d00)
Failed 18/21 subtests
Method "timer" not implemented by subclass at /home/tom/.cpan/build/IO-
Async-Loop-Mojo-0.02-Y8KNHz/blib/lib/IO/Async/Loop/Mojo.pm line 169.
# Looks like you planned 25 tests but ran 4.
# Looks like your test exited with 255 just after 4.
t/02loop-timer.t ....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 21/25 subtests
Method "io" not implemented by subclass at /home/tom/.cpan/build/IO-
Async-Loop-Mojo-0.02-Y8KNHz/blib/lib/IO/Async/Loop/Mojo.pm line 92.
# Looks like you planned 18 tests but ran 3.
# Looks like your test exited with 29 just after 3.
The complaints about missing io and timer methods are due to the base
Mojo::Reactor class being instantiated rather than a specific
implementation, which can be fixed by calling Mojo::Reactor->detect->new
instead of Mojo::Reactor->new.
Once this is applied, the remaining failures appear to be due to $mojo-
Show quoted text
>drop() being renamed to $mojo->remove(), API seems the same apart from
that and aside from the "Too late to run CHECK block" warnings (see
RT81292) the tests pass with these two changes.
Not sure how to handle backward compatibility for this, but I'll leave
that to your discretion =)
cheers,
Tom
Subject: | 2012-11-20-io-async-loop-mojo.diff |
diff -uNPr IO-Async-Loop-Mojo-0.02-Y8KNHz/lib/IO/Async/Loop/Mojo.pm IO-Async-Loop-Mojo-0.02-kB4_h5/lib/IO/Async/Loop/Mojo.pm
--- IO-Async-Loop-Mojo-0.02-Y8KNHz/lib/IO/Async/Loop/Mojo.pm 2012-03-21 18:37:45.000000000 +0000
+++ IO-Async-Loop-Mojo-0.02-kB4_h5/lib/IO/Async/Loop/Mojo.pm 2012-11-20 05:36:54.496368392 +0000
@@ -55,7 +55,7 @@
my $class = shift;
my $self = $class->__new( @_ );
- $self->{reactor} = Mojo::Reactor->new;
+ $self->{reactor} = Mojo::Reactor->detect->new;
return $self;
}
@@ -129,7 +129,7 @@
$reactor->watch( $handle => defined $cbs->[0], defined $cbs->[1] );
}
else {
- $reactor->drop( $handle );
+ $reactor->remove( $handle );
delete $self->{io_cbs}{$fd};
}
}
@@ -180,7 +180,7 @@
my $reactor = $self->{reactor};
- $reactor->drop( $id );
+ $reactor->remove( $id );
delete $self->{timercallbacks}{$id};
return;
@@ -217,7 +217,7 @@
$self->_manage_queues;
- $reactor->drop( $timeout_id );
+ $reactor->remove( $timeout_id );
}
=head1 AUTHOR