Skip to content

Commit d9b3bd5

Browse files
t-a-kkhwilliamson
authored andcommitted
perldelta.pod: describe the bug where "0+" methods were sometimes called in reverse order
The previous commit "pp.c, pp_hot.c: Reorder SvXV_nomg() to fetch operands in left-to-right order" will not only change the order of "Use of uninialized value" warnings, but actually also thange the order of the call of "0+" overloading methods for each operands.
1 parent de5f7f2 commit d9b3bd5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pod/perldelta.pod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,16 @@ manager will later use a regex to expand these into links.
376376

377377
XXX
378378

379+
=item *
380+
381+
When both operands of arithmetic operators (C<+>, C<->, etc.) are
382+
L<overload>ed objects which have no method for that operator but have
383+
C<0+> method with C<fallback> option being set to TRUE,
384+
perl will call the C<0+> methods for these operands in the same order
385+
with operand evaluation order, i.e. left-to-right normally,
386+
but if S<C<use integer;>> is in effect they used to be called
387+
in reverse order.
388+
379389
=back
380390

381391
=head1 Known Problems

0 commit comments

Comments
 (0)