The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Chj::IO::Command

SYNOPSIS

 use Chj::IO::Command;
 # my $mail= Chj::IO::Command->new_out("sendmail","-t");  or:
 # my $mail= Chj::IO::Command->new_writer("sendmail","-t"); or:
 my $mail= Chj::IO::Command->new_receiver("sendmail","-t");
 warn "sendmail has pid ".$mail->pid;
 $mail->xprint("From:..\nTo:..\n\n...");
 my $exitcode= $mail->xfinish;
 # my $date= Chj::IO::Command->new_in("date")->xcontent;
 # my $date= Chj::IO::Command->new_reader("date")->xcontent;
 my $date= Chj::IO::Command->new_sender("date")->xcontent;
 # there's also ->new_err, which allows to gather errors

 # or catch stdout and stderr both together:
 my $str= Chj::IO::Command->new_combinedsender("foo","bar","baz")->xcontent;

DESCRIPTION

Launches external commands with input or output pipes. Inherits from Chj::IO::Pipe.

There is no support for multiple pipes to the same process.

NOTE

'new_in' does mean input from the view of the main process. May be a bit confusing, since it's stdout of the subprocess. Same thing for 'new_out'. Maybe the aliases 'new_reader' and 'new_writer' are a bit less confusing (true?).

SEE ALSO

Chj::IO::CommandBidirectional, Chj::IO::CommandCommon, Chj::IO::Pipe, Chj::IO::CommandStandalone

NOTE

This is alpha software! Read the package README.