Skip to content

Commit 1f58d8d

Browse files
committed
[operators] and, andthen, or
1 parent 7778a70 commit 1f58d8d

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

lib/operators.pod

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ symbol(s) that make up the operator:
9898
9999
As a special case the I<listop> (list operator) can stand either as a
100100
term or as a prefix. Subroutine calls are the most common listops. Other
101-
cases include meta-reduced infix operators and the L<#prefix ...> etc. stub
102-
operators.
101+
cases include meta-reduced infix operators (C<[+]| 1, 2, 3>) and the
102+
L<#prefix ...> etc. stub operators.
103103
104104
105105
=head1 Method Postfix
@@ -1085,5 +1085,27 @@ roles).
10851085
If the C<...> statement is executed, it calls L<&warn>, with the default
10861086
message C<stub code executed>.
10871087
1088+
=head1 Loose AND precedence
1089+
1090+
=head2 infix and
1091+
1092+
Same as L<#infix &&>, except with looser precedence.
1093+
1094+
Returns the first operand that evaluates to C<False> in boolean context, or
1095+
otherwise the last operand. Short-circuits.
1096+
1097+
=head2 infix andthen
1098+
1099+
Returns the first undefined argument, otherwise the last argument.
1100+
Short-circuits.
1101+
1102+
=head1 Loose OR Precedence
1103+
1104+
=head2 infix or
1105+
1106+
Same as L<#infix ||>, except with looser precedence.
1107+
1108+
Returns the first argument that evaluates to C<True> in boolean context,
1109+
or otherwise the last argument. Short-circuits.
10881110
10891111
=end pod

0 commit comments

Comments
 (0)