Skip to content

Commit

Permalink
Fix support for Perl 5.6.2
Browse files Browse the repository at this point in the history
As a second argument for 'first' is expected list. Perl 5.6.2 parser
incorrectly thinks that qw/.../ is not list.

So use explicit list of values instead of qw operator.
  • Loading branch information
pali committed Oct 1, 2020
1 parent a6ce8d8 commit 535a4a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,5 +1,6 @@
language: perl
perl:
- "5.6.2"
- "5.8"
- "5.10"
- "5.12"
Expand Down
2 changes: 1 addition & 1 deletion lib/Test2/API/InterceptResult/Squasher.pm
Expand Up @@ -29,7 +29,7 @@ sub can_squash {
return unless $event->has_info;

# Do not merge up if one of these is true
return if first { $event->$_ } qw/causes_fail has_assert has_bailout has_errors has_plan has_subtest/;
return if first { $event->$_ } 'causes_fail', 'has_assert', 'has_bailout', 'has_errors', 'has_plan', 'has_subtest';

# Signature if we can squash
return $event->trace_signature;
Expand Down

0 comments on commit 535a4a7

Please sign in to comment.