This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Filter::Util::Call to CPAN version 1.51
[perl5.git] / pod / perldelta.pod
index 39ea78e..659a470 100644 (file)
@@ -27,6 +27,12 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
+=head2 faster array and hash lookups
+
+Array and hash lookups (especially nested ones) that use only constants
+or simple variables as keys, are now considerably faster. See
+L</Internal Changes> for more details.
+
 =head2 C<fileno> now works on directory handles
 
 When the relevant support is available in the operating system, the
@@ -136,6 +142,13 @@ Win32 Perl uses 8 KB less of per-process memory than before for every perl
 process of this version. This data is now memory mapped from disk and shared
 between perl processes from the same perl binary.
 
+=item *
+
+If method and class names are known at compile time, hashes are precomputed
+to speed up run-time method lookup.  Also, compound method names like
+C<SUPER::new> are parsed at compile time, to save having to parse them at
+run time.
+
 =back
 
 =head1 Modules and Pragmata
@@ -218,6 +231,22 @@ optional.
 Whitespace is no longer escaped in regular expressions, because it was
 getting erroneously escaped within C<(?x:...)> sections.
 
+C<sub foo { foo() }> is now deparsed with those mandatory parentheses.
+
+C</@array/> is now deparsed as a regular expression, and not just
+C<@array>.
+
+C</@{-}/>, C</@{+}/> and C<$#{1}> are now deparsed with the braces, which
+are mandatory in these cases.
+
+In deparsing feature bundles, B::Deparse was emitting C<no feature;> first
+instead of C<no feature ':all';>.  This has been fixed.
+
+C<chdir FH> is now deparsed without quotation marks.
+
+C<\my @a> is now deparsed without parentheses.  (Parenthese would flatten
+the array.)
+
 =item *
 
 L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
@@ -227,6 +256,9 @@ Only declare C<file> unused if we actually define it.
 Improve generated C<RETVAL> code generation to avoid repeated
 references to C<ST(0)>.  [perl #123278]
 
+Broaden and document the C</OBJ$/> to C</REF$/> typemap optimization
+for the C<DESTROY> method.  [perl #123418]
+
 =item *
 
 The PathTools module collection has been upgraded from 3.52 to 3.53.
@@ -459,6 +491,25 @@ The C<OP_SIBLING> and C<OP_HAS_SIBLING> macros added in an earlier 5.21.x
 release have been renamed C<OpSIBLING> and C<OpHAS_SIBLING>, following the
 existing convention.
 
+=item *
+
+A new op class, C<UNOP_AUX>, has been added. This is a subclass of
+C<UNOP> with an C<op_aux> field added, which points to an array of unions
+of C<UV>, C<SV*> etc. It is intended for where an op needs to store more data
+than a simple C<op_sv> or whatever. Currently the only op of this type is
+C<OP_MULTIDEREF> (see below).
+
+=item *
+
+A new op has been added, C<OP_MULTIDEREF>, which performs one or more
+nested array and hash lookups where the key is a constant or simple
+variable. For example the expression C<$a[0]{$k}[$i]>, which previously
+involved ten C<rv2Xv>, C<Xelem>, C<gvsv> and C<const> ops is now performed
+by a single C<multideref> op. It can also handle C<local>, C<exists> and
+C<delete>. A non-simple index expression, such as C<[$i+1]> is still done
+using C<aelem/helem>, and single-level array lookup with a small constant
+index is still done using C<aelemfast>.
+
 =back
 
 =head1 Selected Bug Fixes
@@ -516,6 +567,17 @@ C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
 C<eval '$variable'> in nested named subroutines would sometimes look up a
 global variable even with a lexical variable in scope.
 
+In perl 5.20.0, C<sort CORE::fake> where 'fake' is anything other than a
+keyword started chopping of the last 6 characters and treating the result
+as a sort sub name.  The previous behaviour of treating "CORE::fake" as a
+sort sub name has been restored.  [perl #123410]
+
+=item *
+
+Outside of C<use utf8>, a single-character Latin-1 lexical variable is
+disallowed.  The error message for it, "Can't use global $foo...", was
+giving garbage instead of the variable name.
+
 =back
 
 =head1 Known Problems