Subject: | IO::Async::Process' on_exception has confusing args |
Date: | Tue, 16 Sep 2014 08:45:22 -0500 |
To: | bug-IO-Async [...] rt.cpan.org |
From: | fREW Schmidt <frioux [...] gmail.com> |
I may be wrong here, but I was under the impression that error
callbacks usually have $self, $human_readable args as their first two
args. The `on_exception` $human_readable arg for IO::Async::Process
is (often?) blank. Example:
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Async::Loop;
use IO::Async::Process;
my $loop = IO::Async::Loop->new;
$loop->add(
IO::Async::Process->new(
command => [ 'herp', 'derp' ],
on_finish => sub {},
on_exception => sub {
my $self = shift;
use Devel::Dwarn;
Dwarn \@_;
},
)
);
$loop->run
--
fREW Schmidt
https://blog.afoolishmanifesto.com
Message body not shown because it is not plain text.