Skip Menu |

This queue is for tickets about the System-Command CPAN distribution.

Report information
The Basics
Id: 80171
Status: resolved
Priority: 0/
Queue: System-Command

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
moseley [...] hank.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.07
Fixed in: 1.08



What's the point of the eval here? It's hiding all open3 exceptions. Might be nice to see the error that the program doesn't exist, for example: # start the command $pid = eval { open3( $in, $out, $err, @cmd ); }; return ( $pid, $in, $out, $err ); It's hiding it because it's called within another eval: my ( $pid, $in, $out, $err ) = eval { $_spawn->(@cmd); };
On Sat Oct 13 19:48:23 2012, HANK wrote: Show quoted text
> What's the point of the eval here? It's hiding all open3 exceptions. > Might be nice to see the > error that the program doesn't exist, for example: > > # start the command > $pid = eval { open3( $in, $out, $err, @cmd ); }; > > return ( $pid, $in, $out, $err ); > > It's hiding it because it's called within another eval: > > my ( $pid, $in, $out, $err ) = eval { $_spawn->(@cmd); };
That eval comes from a refactoring step, and got duplicated in the move. Thanks for spotting and reporting it. -- BooK
Subject: eval is hiding IPC::Open3 exceptions
Le 2012-10-18 09:58:37, BOOK a écrit : Show quoted text
> That eval comes from a refactoring step, and got duplicated in the move. > Thanks for spotting and reporting it. > > -- BooK
Committed in https://github.com/book/System-Command/commit/f19b83b5228bc6746879e0b52a7acbfe4fc82672 But unfortunately not yet released... -- Olivier Mengué - http://perlresume.org/DOLMEN