You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$? might be affected by syscall. But the same is true for $!. As been said in perlvar :
When referenced, $! retrieves the current value of the C errno integer variable. If $! is assigned a numerical value, that value is stored in errno. When referenced as a string, $! yields the system error string corresponding to errno.
Many system or library calls set errno if they fail, to indicate the cause of failure. They usually do not set errno to zero if they succeed and may set errno to a non-zero value on success. This means errno, hence $!, is meaningful only immediately after a failure
So it is reasonable to store the $! somewhere and then re-assign but I am not sure if this behaviour is correct and this fix is proper.
However, I can prepare the PR for review if it is ok for you.
The text was updated successfully, but these errors were encountered:
Hello!
We have a legacy system that we are moving to the modern perl from older one and we have some issues with Expect on macos.
As you already mentioned in the DESTROY: https://github.com/jacoby/expect.pm/blob/master/lib/Expect.pm#L1844
So it is reasonable to store the $! somewhere and then re-assign but I am not sure if this behaviour is correct and this fix is proper.
However, I can prepare the PR for review if it is ok for you.
The text was updated successfully, but these errors were encountered: