From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

use strict;
BEGIN {
if (!eval { require Mojo::IOLoop; Mojo::IOLoop->import; 1 }) {
plan skip_all => "Mojo::IOLoop is required for this test";
}
}
use v5.12;
lives_ok {
Mojo::IOLoop->timer(
0 => sub { die 'test' }
);
Mojo::IOLoop->timer(
0 => sub { say 'test' }
);
Mojo::IOLoop->one_tick();
} 'die is only printed to stderr';
done_testing(1);