Skip Menu |

This queue is for tickets about the IPC-Cmd CPAN distribution.

Report information
The Basics
Id: 70530
Status: new
Priority: 0/
Queue: IPC-Cmd

People
Owner: Nobody in particular
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.72
Fixed in: (no value)



Subject: Problems with arguments to run_forked()
Hi, 1/ The COMMAND argument taken by run() can be either a scalar or an arrayref. Without indication of the contrary I assume that it is the same for run_forked(). However, if I run run_forked() with an arrayref as argument, I get an error on stderr: Invalid command reference: ARRAY I would consider this a bug and fix run_forked() so that it takes a COMMAND as scalar or arrayref, just like run(). 2/ The interface to run_forked() does not follow the same conventions as the one for run(). Could the run_forked() interface by changed to match more closely the interface of run()? From: $hashref = run_forked( COMMAND, { child_stdin => SCALAR, timeout => DIGIT, stdout_handler => CODEREF, stderr_handler => CODEREF} ); to: ($ok, $err_msg, $merged, $stdout, $stderr, $timeout) = run_forked( command => COMMAND, child_stdin => SCALAR, timeout => DIGIT, stdout_handler => CODEREF, stderr_handler => CODEREF ); 3/ Finally, an simple example in the synopsis would go a long way to help people use run_forked(). Cheers, Florent