Subject: | Implement convenience getter methods |
Hi,
Thanks for the excellent work on IPC::Run! I was wondering if it would
be possible to add a few convenience methods.
For example, I would be convenient to have a pid() method to retrieve
the process ID of a running job. This should be easy to add since this
value is already stored in IPD::Run objects:
$self->{KIDS}->[0]->{PID}
Another convenient method would be to get whether a process is running,
i.e. was it start()ed, finish()ed? Again, the state of the process is
stored by IPC::Run, so it not be too hard to implement:
$self->{STATE}
Finally, a feature that is not advertised is that given a program name,
IPC::Run attempts to find its full path, similarly to what File::Which
does. A method to get this full path would be useful. This path is
stored in:
$self->{KIDS}->[0]->{PATH}
Regards,
Florent