Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2009 18:49:29 -0600
From:      "Zane C.B." <vvelox@vvelox.net>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/130563: New port: devel/p5-IO-MultiPipe Check for errors when running a command through multiple pipes
Message-ID:  <1231980569.41163@vixen42.vulpes>
Resent-Message-ID: <200901150050.n0F0o3Mm001608@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         130563
>Category:       ports
>Synopsis:       New port: devel/p5-IO-MultiPipe  Check for errors when running a command through multiple pipes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 15 00:50:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Zane C.B.
>Release:        FreeBSD 6.4-PRERELEASE i386
>Organization:
>Environment:


System: FreeBSD 6.4-PRERELEASE #2: Thu Nov 20 15:59:23 CST 2008
    root@vixen42.vulpes:/usr/obj/usr/src/sys/vixen42



>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 seperately.

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/~vvelox/IO-MultiPipe/



>How-To-Repeat:


1: unshar
2:
3: install and enjoy


>Fix:


--- devel_p5-IO-MultiPipe.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	devel/p5-IO-MultiPipe/
#	devel/p5-IO-MultiPipe/pkg-descr
#	devel/p5-IO-MultiPipe/Makefile
#	devel/p5-IO-MultiPipe/pkg-plist
#	devel/p5-IO-MultiPipe/distinfo
#
echo c - devel/p5-IO-MultiPipe/
mkdir -p devel/p5-IO-MultiPipe/ > /dev/null 2>&1
echo x - devel/p5-IO-MultiPipe/pkg-descr
sed 's/^X//' >devel/p5-IO-MultiPipe/pkg-descr << 'bbb7b222dc2b28ef7bbb3fbf2223d7cd'
XNormally if a part of a pipe fails, depending on the location, it won't
Xbe detected. This breaks down a command involving pipes and runs each
Xcommand seperately.
X
XIt uses open3 to run each chunk of the pipe.
X
X    use IO::MultiPipe;
X    
X    my $pipes = IO::MultiPipe->new();
X	    
X    #This sets the pipe that will be run.
X    $pipes->set('sed s/-// | sed s/123/abc/ | sed s/ABC/abc/');
X    if ($pipes->{error}){
X        print "Error!\n";
X    }
X
X    #'123-ABCxyz' through the command set above.
X    my $returned=$pipes->run('123-ABCxyz');
X
XWWW: http://search.cpan.org/~vvelox/IO-MultiPipe/
bbb7b222dc2b28ef7bbb3fbf2223d7cd
echo x - devel/p5-IO-MultiPipe/Makefile
sed 's/^X//' >devel/p5-IO-MultiPipe/Makefile << '4ee16c1a444daaac727e5fedb5420388'
X# New ports collection makefile for:	p5-IO-MultiPipe
X# Date created:		2009-01-14
X# Whom:			Zane C, Bowers <vvelox@vvelox.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	IO-MultiPipe
XPORTVERSION=	0.0.0
XCATEGORIES=	net perl5
XMASTER_SITES=	CPAN
XMASTER_SITE_SUBDIR=	../../authors/id/V/VV/VVELOX
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	vvelox@vvelox.net
XCOMMENT=	Check for errors when running a command through multiple pipes
X
XPERL_CONFIGURE=	yes
X
XMAN3=		IO::MultiPipe.3
X
X.include <bsd.port.mk>
4ee16c1a444daaac727e5fedb5420388
echo x - devel/p5-IO-MultiPipe/pkg-plist
sed 's/^X//' >devel/p5-IO-MultiPipe/pkg-plist << '29f134516e396ee5d615d26168c13dbf'
X%%SITE_PERL%%/IO/MultiPipe.pm
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/IO/MultiPipe/.packlist
X@dirrmtry %%SITE_PERL%%/IO
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/IO/MultiPipe
29f134516e396ee5d615d26168c13dbf
echo x - devel/p5-IO-MultiPipe/distinfo
sed 's/^X//' >devel/p5-IO-MultiPipe/distinfo << '1b07cbcdf6de7d140684be2f0df30a3e'
XMD5 (IO-MultiPipe-0.0.0.tar.gz) = 7f311e9405adcb12ddee1edb5f869ade
XSHA256 (IO-MultiPipe-0.0.0.tar.gz) = e300e5ca4c8a80d563b6b75191bdb37bd0833d2d14b7ed6c970cee6a8c0dd17c
XSIZE (IO-MultiPipe-0.0.0.tar.gz) = 3877
1b07cbcdf6de7d140684be2f0df30a3e
exit

--- devel_p5-IO-MultiPipe.shar ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1231980569.41163>