Subject: | IO::Async::Function - the $@ error string is not passed to 'on_result' |
use 5.020;
use warnings;
use IO::Async::Loop;
use IO::Async::Function;
my $loop = IO::Async::Loop-> new;
my $func = IO::Async::Function-> new( code => sub { die "BOOM!\n" });
$loop-> add( $func );
$func-> call( args => [], on_result => sub { say for @_ });
$loop-> run;
Which says 'error error' instead of 'error BOOM!', as I would expect. It looks like the string is discarded from the list of arguments in line 400. But maybe arguments arrive there in wrong order, i.e. problem begins somewhere earlier.