The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<link rel="stylesheet" type="text/css" title="pod_stylesheet" href="http://search.cpan.org/s/style.css">

</head>
<body class='pod'>
<!--
  generated by Pod::Simple::HTML v3.26,
  using Pod::Simple::PullParser v3.26,
  under Perl v5.016003 at Sun Sep  1 19:21:25 2013 GMT.

 If you want to change this HTML document, you probably shouldn't do that
   by changing it directly.  Instead, see about changing the calling options
   to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
   then reconverting this document from the Pod source.
   When in doubt, email the author of Pod::Simple::HTML for advice.
   See 'perldoc Pod::Simple::HTML' for more info.

-->

<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>

<div class='indexgroup'>
<ul   class='indexList indexList1'>
  <li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
  <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
  <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
  <li class='indexItem indexItem1'><a href='#CONSTRUCTOR'>CONSTRUCTOR</a>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#new()'>new()</a>
  </ul>
  <li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#err_buffer()'>err_buffer()</a>
    <li class='indexItem indexItem2'><a href='#out_buffer()'>out_buffer()</a>
    <li class='indexItem indexItem2'><a href='#run(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)'>run( $command, $arg1, ..., $argN, \%options )</a>
    <li class='indexItem indexItem2'><a href='#run_or_die(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)'>run_or_die( $command, $arg1, ..., $argN, \%options )</a>
  </ul>
  <li class='indexItem indexItem1'><a href='#AUTHOR'>AUTHOR</a>
  <li class='indexItem indexItem1'><a href='#COPYRIGHT'>COPYRIGHT</a>
</ul>
</div>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>IPC::Open3::Callback::CommandRunner - A utility class that wraps IPC::Open3::Callback with available output buffers and an option to die on failure instead of returning exit code.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<pre>  use IPC::Open3::Callback::CommandRunner;

  my $command_runner = IPC::Open3::Callback::CommandRunner-&#62;new();
  my $exit_code = $command_runner-&#62;run( &#39;echo Hello, World!&#39; );

  eval {
      $command_runner-&#62;run_or_die( $command_that_might_die );
  };
  if ( $@ ) {
      print( &#34;command died: $@\n&#34; );
  }</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>Adds more convenience to IPC::Open3::Callback by buffering output and error if needed and dieing on failure if wanted.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="CONSTRUCTOR"
>CONSTRUCTOR</a></h1>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="new()"
>new()</a></h2>

<p>The constructor creates a new CommandRunner.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="err_buffer()"
>err_buffer()</a></h2>

<p>Returns the contents of the err_buffer from the last call to <a href="#run(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run</a> or <a href="#run_or_die(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run_or_die</a>.</p>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="out_buffer()"
>out_buffer()</a></h2>

<p>Returns the contents of the err_buffer from the last call to <a href="#run(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run</a> or <a href="#run_or_die(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run_or_die</a>.</p>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="run(_$command,_$arg1,_...,_$argN,_\%options_)"
>run( $command, $arg1, ..., $argN, \%options )</a></h2>

<p>Will run the specified command with the supplied arguments by passing them on to <a href="http://search.cpan.org/perldoc?IPC%3A%3AOpen3%3A%3ACallback#run_command(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run_command</a>. Arguments can be embedded in the command string and are thus optional.</p>

<p>If the last argument to this method is a hashref (<code>ref(@_[-1]) eq &#39;HASH&#39;</code>), then it is treated as an options hash. The supported allowed options are the same as <a href="http://search.cpan.org/perldoc?IPC%3A%3AOpen3%3A%3ACallback#run_command(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run_command</a> plus:</p>

<dl>
<dt><a name="out_buffer"
>out_buffer</a></dt>

<dd>
<p>If true, a callback will be generated for <code>STDOUT</code> that buffers all data and can be accessed via <a href="#out_buffer()" class="podlinkpod"
>out_buffer()</a></p>

<dt><a name="err_buffer"
>err_buffer</a></dt>

<dd>
<p>If true, a callback will be generated for <code>STDERR</code> that buffers all data and can be accessed via <a href="#err_buffer()" class="podlinkpod"
>err_buffer()</a></p>
</dd>
</dl>

<p>Returns the exit code from the command.</p>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="run_or_die(_$command,_$arg1,_...,_$argN,_\%options_)"
>run_or_die( $command, $arg1, ..., $argN, \%options )</a></h2>

<p>The same as <a href="#run(_%24command%2C_%24arg1%2C_...%2C_%24argN%2C_%5C%25options_)" class="podlinkpod"
>run</a> exept that it will <code>die</code> on a non-zero exit code instead of returning the exit code.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>

<p>Lucas Theisen (lucastheisen@pastdev.com)</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT"
>COPYRIGHT</a></h1>

<p>Copyright 2013 pastdev.com. All rights reserved.</p>

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

<!-- end doc -->

</body></html>