summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Etheridge <ether@cpan.org>2017-11-19 17:18:31 -0800
committerKaren Etheridge <ether@cpan.org>2017-11-20 14:07:36 -0800
commit5db3efd0767b6530d6660e42935b0208d25f940f (patch)
treec673acf255157c96fff23a64dad96f00e50564ce
parent1a98acd9b14cfb3953d2b14eee2394454f92f0c8 (diff)
downloadperl-5db3efd0767b6530d6660e42935b0208d25f940f.tar.gz
add missing section on sub typeglobs to perl275delta
-rw-r--r--pod/perl5275delta.pod20
1 files changed, 20 insertions, 0 deletions
diff --git a/pod/perl5275delta.pod b/pod/perl5275delta.pod
index 77695715c0..a213568f77 100644
--- a/pod/perl5275delta.pod
+++ b/pod/perl5275delta.pod
@@ -12,6 +12,26 @@ release.
If you are upgrading from an earlier release such as 5.27.3, first read
L<perl5274delta>, which describes differences between 5.27.3 and 5.27.4.
+=head1 Incompatible Changes
+
+=head2 Subroutines no longer need typeglobs
+
+Perl 5.22.0 introduced an optimization allowing subroutines to be stored in
+packages as simple sub refs, not requiring a full typeglob (thus
+potentially saving large amounts of memeory). However, the optimization
+was flawed: it only applied to the main package.
+
+This optimization has now been extended to all packages. This may break
+compatibility with introspection code that looks inside stashes and expects
+everything in them to be a typeglob.
+
+When this optimization happens, the typeglob still notionally exists, so
+accessing it will cause the stash entry to be upgraded to a typeglob. The
+optimization does not apply to XSUBs or exported subroutines, and calling a
+method will undo it, since method calls cache things in typeglobs.
+
+[perl #129916] [perl #132252]
+
=head1 Performance Enhancements
=over 4