Skip to content
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

Fix 'return-or-die' statements. #36

Merged
merged 1 commit into from Jul 26, 2018
Merged

Fix 'return-or-die' statements. #36

merged 1 commit into from Jul 26, 2018

Conversation

gugod
Copy link
Contributor

@gugod gugod commented Jul 25, 2018

Statements like this:

return do_something() or die "something is wrong";

... are almost certainly mistakes. Since or has lower precedence
than return, it is equivalent to:

( return do_something() ) or die "something_is wrong";

Since return takes the value to caller, the or operator and the
order side of it never executes.

Statements like this:

    return do_something() or die "something is wrong";

... are almost certainly mistakes. Since `or` has lower precedence
than `return`, it is equivalent to:

   ( return do_something() ) or die "something_is wrong";

Since `return` takes the value to caller, the `or` operator and the
order side of it never executes.
@coveralls
Copy link

coveralls commented Jul 25, 2018

Coverage Status

Coverage decreased (-0.05%) to 90.428% when pulling ffd398a on gugod:master into 0767294 on ukigumo:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 90.428% when pulling ffd398a on gugod:master into 0767294 on ukigumo:master.

@Songmu
Copy link
Member

Songmu commented Jul 26, 2018

Thanks.

@Songmu Songmu merged commit 2dfb52e into ukigumo:master Jul 26, 2018
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.

None yet

3 participants