1Syntax::Feature::JunctiUosne(r3)Contributed Perl DocumenStyanttiaoxn::Feature::Junction(3)
2
3
4
6 Syntax::Feature::Junction - Provide keywords for any, all, none, or one
7
9 version 0.003008
10
12 use syntax 'junction';
13
14 if (any(@grant) eq 'su') {
15 ...
16 }
17
18 if (all($foo, $bar) >= 10) {
19 ...
20 }
21
22 if (qr/^\d+$/ == all(@answers)) {
23 ...
24 }
25
26 if (all(@input) <= @limits) {
27 ...
28 }
29
30 if (none(@pass) eq 'password') {
31 ...
32 }
33
34 if (one(@answer) == 42) {
35 ...
36 }
37
38 or if you want to rename an export, use Sub::Exporter options:
39
40 use syntax 'junction' => {
41 any => { -as => 'robot_any' }
42 };
43
44 if (robot_any(@grant) eq 'su') {
45 ...
46 }
47
48 The full documentation for this module is in Syntax::Keyword::Junction.
49 This is just a way to use the sugar that syntax gives us.
50
52 • Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
53
54 • Carl Franks
55
57 This software is copyright (c) 2014 by Arthur Axel "fREW" Schmidt.
58
59 This is free software; you can redistribute it and/or modify it under
60 the same terms as the Perl 5 programming language system itself.
61
62
63
64perl v5.34.0 2022-01-21 Syntax::Feature::Junction(3)