-
Notifications
You must be signed in to change notification settings - Fork 580
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
Commands error when topic variable set to undef in compilation #2175
Comments
It is very dangerous to modify |
A simpler way to "defang" the |
Just a thought: since the code inside |
Steps to reproduce the behavior
Loop at line 69 of Mojolicious::Commands encounters an undefined value if the topic variable
$_
is set to undefined in the compilation phase of that command. Example (on a freshly generated app):Note: In the real project case I'm not setting that value explicitly, I'm using
Beam::Wire
at compilation phase which most likely does that one way or another because the observed behavior is the same.Expected behavior
While polluting $_ is obviously erroneous, I believe Commands system should be resistant.
Actual behavior
I get these errors:
Rewriting the Mojolicious::Commands loop to this form fixes the issue for me:
The text was updated successfully, but these errors were encountered: