1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/devel/p5-IO-MultiPipe/pkg-descr
Andrej Zverev 85b13ac345 Fix WWW in pkg-descr to http://search.cpan.org/dist/<MODULE> for unification.
No functional changes.

Sponsored by:	p5 namespace
2011-02-12 09:30:23 +00:00

21 lines
587 B
Plaintext

Normally if a part of a pipe fails, depending on the location, it won't
be detected. This breaks down a command involving pipes and runs each
command separately.
It uses open3 to run each chunk of the pipe.
use IO::MultiPipe;
my $pipes = IO::MultiPipe->new();
#This sets the pipe that will be run.
$pipes->set('sed s/-// | sed s/123/abc/ | sed s/ABC/abc/');
if ($pipes->{error}){
print "Error!\n";
}
#'123-ABCxyz' through the command set above.
my $returned=$pipes->run('123-ABCxyz');
WWW: http://search.cpan.org/dist/IO-MultiPipe/