This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix for redefined sort subs nastiness
[perl5.git] / pod / perldelta.pod
index 9574872..4186d82 100644 (file)
@@ -1102,6 +1102,14 @@ dereference it first.  See L<perlfunc/substr>.
 (F) Only hard references are allowed by "strict refs".  Symbolic references
 are disallowed.  See L<perlref>.
 
+=item Can't redefine active sort subroutine %s
+
+(F) Perl optimizes the internal handling of sort subroutines and keeps
+pointers into them.  You tried to redefine one such sort subroutine when it
+was currently active, which is not allowed.  If you really wanted to do
+this, you should wrap the subroutine with another one that does nothing
+but call it, and use the wrapper as the sort subroutine.
+
 =item Cannot resolve method `%s' overloading `%s' in package `%s'
 
 (P) Internal error trying to resolve overloading specified by a method