This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for ‘no overload "invalid"’ warnings
[perl5.git] / pod / perldelta.pod
index c8ad617..73dfa1f 100644 (file)
@@ -121,6 +121,12 @@ did not exist [perl #112126].
 
 =item *
 
+L<overload> has been upgraded from version 1.18 to 1.19.
+
+C<no overload> now warns for invalid arguments, just like C<use overload>.
+
+=item *
+
 L<Storable> has been upgraded from version 2.34 to 2.35.
 
 Modifying C<$_[0]> within C<STORABLE_freeze> no longer results in crashes
@@ -335,7 +341,25 @@ be noted as well.
 
 =item *
 
-XXX
+The C<SVf_AMAGIC> flag to indicate overloading is now on the stash, not the
+object.  It is now set automatically whenever a method or @ISA changes, so
+its meaning has changed, too.  It now means "potentially overloaded".  When
+the overload table is calculated, the flag is automatically turned off if
+there is no overloading, so there should be no noticeable slowdown.
+
+The staleness of the overload tables is now checked when overload methods
+are invoked, rather than during C<bless>.
+
+"A" magic is gone.  The changes to the handling of the C<SVf_AMAGIC> flag
+eliminate the need for it.
+
+The core no longer increments C<PL_amagic_generation> (it doesn't need to).
+But an XS module can still increment it to mark all overload tables as
+stale.  (It is still not part of the API, though.)  Do not rely on this.
+It may be deleted in the next release.
+
+The fallback overload setting is now stored in its own stash entry, called
+"(fallback".
 
 =back
 
@@ -400,6 +424,21 @@ Now it produces an error.
 
 C<vec> now works with extremely large offsets (>2 GB) [perl #111730].
 
+=item *
+
+Changes to overload settings now take effect immediately, as do changes to
+inheritance that affect overloading.  They used to take effect only after
+C<bless>.
+
+Objects that were created before a class had any overloading used to remain
+non-overloaded even if the class gained overloading through C<use overload>
+or @ISA changes, and even after C<bless>.  This has been fixed
+[perl #112708].
+
+=item *
+
+Classes with overloading can now inherit fallback values.
+
 =back
 
 =head1 Known Problems