Zane C. Bowers > IO-MultiPipe-0.0.0 > IO::MultiPipe

Download:
IO-MultiPipe-0.0.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.0.0   Source  

NAME ^

IO::MultiPipe - Allows for error checking on a command involving multiple pipes.

VERSION ^

Version 0.0.0

SYNOPSIS ^

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

FUNCTIONS ^

new

Initializes the object.

run

This runs the data through the pipe.

set

Sets the command that will be used.

    $pipes->set('sed s/-// | sed s/123/abc/ | sed s/ABC/abc/');
    if ($pipes->{error}){
        print "Error!\n";
    }

errorBlank

This blanks the error storage and is only meant for internal usage.

It does the following.

    $self->{error}=undef;
    $self->{errorString}="";

ERROR CODES ^

This is contained in '$pipe->{error}'. Any time this is true, there is an error.

1

No command passed to the set function.

2

Command contains null section.

3

No command has been set yet. The 'set' needs called first before calling 'run'.

4

Opening the command failed.

5

The command errored.

AUTHOR ^

Zane C. Bowers, <vvelox at vvelox.net>

BUGS ^

Please report any bugs or feature requests to bug-io-multipipe at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IO-MultiPipe. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc IO::MultiPipe

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2008 Zane C. Bowers, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.