Chj::IO::Command
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;
Launches external commands with input or output pipes. Inherits from Chj::IO::Pipe.
There is no support for multiple pipes to the same process.
'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?).
Chj::IO::CommandBidirectional, Chj::IO::CommandCommon, Chj::IO::Pipe, Chj::IO::CommandStandalone
This is alpha software! Read the package README.
To install FunctionalPerl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FunctionalPerl
CPAN shell
perl -MCPAN -e shell install FunctionalPerl
For more information on module installation, please visit the detailed CPAN module installation guide.