Skip to content
Snippets Groups Projects

Fix precedence problem by replacing or with ||

Merged Marek Szuba requested to merge github/fork/thibauthourlier/feature/fix_return_or into master

Created by: thibauthourlier

Since Perl 5.22, it warns of possible precedence problem it cases like : return $value or die('Sad'); return $value is tested, not $value. It can be fixed by either using || or by using () around the test. The problem was already there in earlier versions of Perl but no waring was issued.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: thibauthourlier

    I've made the changes requested, by adding an if statement and using confess instead of die

Please register or sign in to reply