IPC-Run icon indicating copy to clipboard operation
IPC-Run copied to clipboard

Implement convenience getter methods [rt.cpan.org #70595]

Open toddr opened this issue 8 years ago • 1 comments
trafficstars

Migrated from rt.cpan.org#70595 (status was 'new')

Requestors:

From [email protected] on 2011-08-30 03:11:23:

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

toddr avatar May 12 '17 12:05 toddr

I'm open to patches but not actively developing myself on the module at this time

toddr avatar Mar 27 '18 01:03 toddr