• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

frioux / Syntax-Keyword-Junction / 24
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 13 Dec 2018 09:39AM UTC
Jobs 8
Files 24
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
24

Pull #18

travis-ci

web-flow
Remove ambiguity in input/limits comparison example

As mentioned in GitHub issue #10, the input/limits comparison example in
the documentation is ambiguous; it could be interpreted as "compare each
element of `@input` with each element of `@limits` and return the `all`
junction of the comparisons".  However this isn't the case, for instance:

```
use strict;
use warnings;

use Syntax::Keyword::Junction qw( all );

my @input = (1, 2, 3, 4, 5, 6);
my @limits = (4, 4, 4, 4, 4, 4);

if (all(@input) <= scalar @limits) {
    print "all input less than or equal to limits\n";
}
else {
    print "not all input less than or equal to limits\n";
}
```

prints "all input less than or equal to limits", but the last two
elements of the `@input` array are greater than the limits.  However,
the input elements are all less than or equal to the length of the
`@limits` array.  If one reduces the length of the `@limits` array, then
the code above prints "not all input less than or equal to limits".
This is the same behaviour as in Perl6 (from the REPL):

```
> all(1, 2, 3, 4, 5, 6) <= (4, 4, 4, 4, 4, 4)
all(True, True, True, True, True, True)
> all(1, 2, 3, 4, 5, 6) <= (4, 4, 4, 4, 4)
all(True, True, True, True, True, False)
```

Consequently, adding the `scalar` keyword in the example makes this
behaviour more obvious.
Pull Request #18: Remove ambiguity in input/limits comparison example

855 of 855 relevant lines covered (100.0%)

40.27 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24.1 13 Dec 2018 09:42AM UTC 0
100.0
Travis Job 24.1
2 24.2 13 Dec 2018 09:39AM UTC 0
100.0
Travis Job 24.2
3 24.3 13 Dec 2018 09:39AM UTC 0
100.0
Travis Job 24.3
4 24.4 13 Dec 2018 09:39AM UTC 0
100.0
Travis Job 24.4
5 24.5 13 Dec 2018 09:39AM UTC 0
100.0
Travis Job 24.5
6 24.6 13 Dec 2018 09:40AM UTC 0
100.0
Travis Job 24.6
7 24.7 13 Dec 2018 09:40AM UTC 0
100.0
Travis Job 24.7
8 24.8 13 Dec 2018 09:40AM UTC 0
99.51
Travis Job 24.8
Source Files on build 24
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #24
  • Pull Request #18
  • PR Base - master (#22)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc