Skip to content

Conversation

@drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Jul 7, 2023

This just assigns the result of calling %+ to a dummy variable to avoid the warning that perl gives stating that this is a useless use of a variable in void context.

If you are using morbo this warning is currently displayed in the terminal as soon as the app starts.

I also think this hack needs further investigation.

@drgrice1
Copy link
Member Author

drgrice1 commented Jul 7, 2023

You will also see this warning if you run the check_latex script.

@Alex-Jordan
Copy link
Contributor

I checked that removing the hack entirely still causes the original issue on my dev server.

This change avoids the original issue as well as prevents that perl warning.

FWIW, I tried if (%+) {}; as well, and that works too without creating %dummy.

…ork#2098

This just assigns the result of calling `%+` to a dummy variable to
avoid the warning that perl gives stating that this is a useless use of
a variable in void context.
@drgrice1 drgrice1 force-pushed the no-warn-useless-use branch from 078a798 to b1f1b69 Compare July 12, 2023 02:21
@Alex-Jordan Alex-Jordan merged commit 5f0a78b into openwebwork:WeBWorK-2.18 Jul 12, 2023
@drgrice1 drgrice1 deleted the no-warn-useless-use branch July 12, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants