CWB
view release on metacpan or search on metacpan
lib/CWB/CQP.pm view on Meta::CPAN
B<Do NOT> send an C<exit;> command to CQP explicitly (with B<exec> or B<run>).
This looks like a program crash to B<CWB::CQP> and will result in immediate
termination of the Perl script.
=cut
sub DESTROY {
my $self = shift;
my $pid = $self->{'pid'};
my $alive = delete $Child{$pid}; # remove from list of children so no longer caught by signal handler
if ($alive && $self->{'command'}) {
while ($self->_update) {} # read pending output from active command
}
my $out = $self->{'out'};
if (defined $out) {
$out->print("exit") # exit CQP backend
if $alive;
$out->close;
}
my $in = $self->{'in'};
if (defined $in) {
$in->close;
}
waitpid $pid, 0 # wait for CQP to exit and reap background process
}
=item I<$ok> = I<$cqp>->B<check_version>(I<$major>, I<$minor>, I<$beta>);
( run in 0.456 second using v1.01-cache-2.11-cpan-df04353d9ac )