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
Newer versions of MCE fail to provide ARRAYREFs sometimes #135
Comments
this is looking pretty scary actually. Seems it's losing data along the way! |
According to Mario, I can do more than mitigate this behavior by simply passing an arrayref to mce_loop. As such, this issue is reopened. |
Hi @teodesian. Folks have wanted the ability for MCE to process a hash as input data. That feature was added recently. But, that made knowing the type to process problematic for an array containing a single element which happens to be a hash ref. MCE will think to process a hash due to being a single element. To ensure MCE is choosing the right type, the solution is to give mce_loop the array ref ( $runs ) instead of ( @$runs ). This is the recommendation when input data contains nested data. Regards, |
@marioroy it looks like accepting arrayrefs has been a feature of MCE::Loop::run() for some time now, at least as far as github knows: This shouldn't be a problem for the deploy environments I care about, so hopefully I won't have to worry about specifying a minimum version. That is, supposing that my interpretation of the above code is correct. |
@teodesian your interpretation is correct. MCE::Loop supported arrayrefs since introduction or 1.500. |
single elem arrays appear to be de-arrayed. Easy enough
The text was updated successfully, but these errors were encountered: