fix "split to @_ is deprecated" warning #1036
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Perl 5.10, perl is incorrectly interpreting any split not assigned to
an array as a split intended to replace @_. Since this behavior was
deprecated, Perl is warning about it. This warning is causing tests in
downstream modules (like my Mercury application) which check for
warnings to fail.
I can't find when this deprecation was added (before 5.6), but the
feature was removed from Perl in 5.12, and the warning fixed to only
apply to split called in void context.
The only syntax that prevents this warning is assigning the result of
split to an array. Disabling the category of this warning ("syntax", as
reported in perldiag) does not seem to prevent this warning, but
disabling all warnings does.