BSD Ports

devel/p5-IO-MultiPipe 0.0.0_1 DragonFly

Check for errors when running a command through multiple pipes

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
Categories
devel, perl5
Package size
5.0 KiB, 7.4 KiB installed

Description

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');

In the other systems

SystemPortVersion
DragonFlydevel/p5-IO-MultiPipe0.0.0_1
FreeBSDdevel/p5-IO-MultiPipe0.0.0_1
HardenedBSDdevel/p5-IO-MultiPipe0.0.0_1
GhostBSDdevel/p5-IO-MultiPipe0.0.0_1

Install

Binary package:

pkg install p5-IO-MultiPipe

From DPorts:

cd /usr/dports/devel/p5-IO-MultiPipe && make install clean

Dependencies

Run dependencies 1

No port depends on this one.