NAME

IPC::Open3::Callback - An extension to Open3 that will feed out and err to callbacks instead of requiring the caller to handle them.

VERSION

version 1.00_02

SYNOPSIS

use IPC::Open3::Callback;
my $runner = IPC::Open3::Callback->new( 
    out_callback => sub {
        print( "$_[0]\n" );
    },
    err_callback => sub {
        print( STDERR "$_[0]\n" );
    } );
$runner->run_command( 'echo Hello World' );

DESCRIPTION

This module feeds output and error stream from a command to supplied callbacks. Thus, this class removes the necessity of dealing with IO::Select by hand and also provides a workaround for Windows systems.

CONSTRUCTOR

new( [ out_callback => SUB ], [ err_callback => SUB ] )

The constructor creates a new object and attaches callbacks for STDOUT and STDERR streams from commands that will get run on this object.

METHODS

run_command( [ COMMAND_LIST ] )

Returns the value of the 'verbose' property. When called with an argument, it also sets the value of the property. Use a true or false Perl value, such as 1 or 0.

AUTHOR

Lucas Theisen (lucastheisen@pastdev.com)

COPYRIGHT

Copyright 2013 pastdev.com. All rights reserved.

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

SEE ALSO

IPC::Open3(1).