In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7f8ad91f301ccedbd53eca8c8ae77acee7cb3700?hp=c12d2356eacf7eb193de44daf7722a24739a07cd>
- Log ----------------------------------------------------------------- commit 7f8ad91f301ccedbd53eca8c8ae77acee7cb3700 Author: David Mitchell <[email protected]> Date: Mon Aug 15 09:36:22 2016 +0100 perldelta: @a = sort @a fix ----------------------------------------------------------------------- Summary of changes: pod/perldelta.pod | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 0e20a39..b04568a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -346,7 +346,13 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>. =item * -XXX +Problems with in-place array sorts: code like C<@a = sort { ... } @a>, +where the source and destination of the sort are the same plain array, are +optimised to do less copying around. Two side-effects of this optimisation +were that the contents of C<@a> as visible to to sort routine were +partially sorted, and under some circumstances accessing C<@a> during the +sort could crash the interpreter. Both these issues have been fixed, and +Sort functions see the original value of C<@a>. =back -- Perl5 Master Repository
