AnyEvent-Subprocess
view release on metacpan or search on metacpan
lib/AnyEvent/Subprocess/Handle.pm view on Meta::CPAN
272829303132333435363738394041424344454647
$handle
->_do_finalize;
return
0;
};
push
@args
,
on_error
=>
$send
,
on_eof
=>
$send
;
# if the on_read is not provided, we never get notified of handle
# close (presumably because no watchers are ever created)
push
@args
,
on_read
=>
sub
{ }
if
$is_read
;
my
$self
=
$class
->SUPER::new(
@args
);
return
$self
;
}
sub
on_finalize {
my
(
$self
,
$cb
) =
@_
;
$self
->{__on_finalize} =
$cb
if
$cb
;
if
(
$cb
&&
$self
->{destroyed} && !
$self
->{finalized}){
$cb
->(
$self
);
lib/AnyEvent/Subprocess/Handle.pm view on Meta::CPAN
737475767778798081828384858687888990919293# push_shutdown).
sub
close_fh {
my
$self
=
shift
;
close
$self
->fh;
}
sub
destroy {
my
(
$self
,
@args
) =
@_
;
my
$rbuf
=
$self
->{rbuf};
$self
->_do_finalize;
$self
->SUPER::destroy(
@args
);
$self
->{rbuf} =
$rbuf
;
$self
->{destroyed} = 1;
return
;
}
1;
=pod
( run in 0.221 second using v1.01-cache-2.11-cpan-cba739cd03b )