-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to know whether a harness is started #171
Comments
Hello. Could you say more about what makes it hard for the application to In general, the proposed method looks harmless and maintenance-free. On the |
The function is a logger of external commands, and the usual behavior is to pass it an If a harness was a one-shot object, this wouldn't be a problem. but because a harness can be run multiple times, it seems generally useful to inspect what state it's currently in so that that state doesn't need to be tracked externally. |
I'd accept such a PR. That said, how well would the following mitigate the eval { $h->pump }; die $@ if $@ and $@ ne 'process ended prematurely'; |
That's sort of what I did in the meantime:
But it would look cleaner for long-term maintenance if it was
|
I have a situation where I want a generic function that finishes a harness and reports its result, but doesn't know if the caller started the harness yet. The module seems to be missing a "->started" accessor.
I can almost achieve this with 'pump', but that has the chance of throwing an exception if a pipe is broken.
From the code in pump, there is:
I basically just want public access to that first line, and then call
->finish
Would you accept a PR for essentially this?
The text was updated successfully, but these errors were encountered: