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

frioux / Syntax-Keyword-Junction / 25
100%

Build:
DEFAULT BRANCH: master
Ran 14 Dec 2018 03:31PM 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
25

push

travis-ci

frioux
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.

855 of 855 relevant lines covered (100.0%)

40.27 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25.1 14 Dec 2018 03:35PM UTC 0
100.0
Travis Job 25.1
2 25.2 14 Dec 2018 03:31PM UTC 0
100.0
Travis Job 25.2
3 25.3 14 Dec 2018 03:31PM UTC 0
100.0
Travis Job 25.3
4 25.4 14 Dec 2018 03:31PM UTC 0
100.0
Travis Job 25.4
5 25.5 14 Dec 2018 03:31PM UTC 0
100.0
Travis Job 25.5
6 25.6 14 Dec 2018 03:32PM UTC 0
100.0
Travis Job 25.6
7 25.7 14 Dec 2018 03:32PM UTC 0
100.0
Travis Job 25.7
8 25.8 14 Dec 2018 03:33PM UTC 0
99.51
Travis Job 25.8
Source Files on build 25
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #25
  • 35a16bc3 on github
  • Prev Build on master (#22)
  • Next Build on master (#27)
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