This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for split-to-array
[perl5.git] / pod / perldelta.pod
index 65c495a..5feaf4a 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 New double-diamond operator
+
+C<<< <<>>> >>> is like C<< <> >> but uses three-argument C<open> to open
+each file in @ARGV.  So each element of @ARGV is an actual file name, and
+"|foo" won't be treated as a pipe open.
+
 =head2 Perl now supports POSIX 2008 locale currency additions.
 
 On platforms that are able to handle POSIX.1-2008, the
@@ -44,9 +50,12 @@ C<int_p_sign_posn>.
 
 =head1 Security
 
-XXX Any security-related notices go here.  In particular, any security
-vulnerabilities closed should be noted here rather than in the
-L</Selected Bug Fixes> section.
+=head2 Perl is now compiled with -fstack-protector-strong if available
+
+Perl has been compiled with the anti-stack-smashing option
+C<-fstack-protector> since 5.10.1.  Now Perl uses the newer variant
+called C<-fstack-protector-strong>, if available.  (This was added
+already in 5.21.4.)
 
 [ List each security issue as a =head2 entry ]
 
@@ -91,7 +100,20 @@ as an updated module in the L</Modules and Pragmata> section.
 
 =back
 
-[ List each other deprecation as a =head2 entry ]
+=head2 Use of multiple /x regexp modifiers
+
+It is now deprecated to say something like any of the following:
+
+    qr/foo/xx;
+    /(?xax:foo)/;
+    use re qw(/amxx);
+
+That is, now C<x> should only occur once in any string of contiguous
+regular expression pattern modifiers.  We do not believe there are any
+occurrences of this in all of CPAN.  This is in preparation for a future
+Perl release having C</xx> mean to allow white-space for readability in
+bracketed character classes (those enclosed in square brackets:
+C<[...]>).
 
 =head1 Performance Enhancements
 
@@ -104,8 +126,22 @@ There may well be none in a stable release.
 
 =item *
 
-C<length> is upto 20% faster for non-magical/non-tied containing a string and
-either non-utf8 or C<use bytes;> scalars.
+C<length> is up to 20% faster for non-magical/non-tied scalars containing a
+string if it is a non-utf8 string or if C<use bytes;> is in scope.
+
+=item *
+
+Non-magical/non-tied scalars that contain only a floating point value and are
+on most Perl builds with 64 bit integers now use 8-32 less bytes of memory
+depending on OS.
+
+=item *
+
+In C<@array = split>, the assigment can be optimised away with C<split>
+writing directly to the array.  This optimisation was happening only for
+package arrays other than @_ and only if the argument to split was an
+explicit constant or scalar other than $_.  Now this optimisation happens
+almost all the time.
 
 =back
 
@@ -135,10 +171,58 @@ XXX
 
 =item *
 
+L<attributes> has been upgraded from version 0.23 to 0.24.
+
+Avoid reading beyond the end of a buffer. [perl #122629]
+
+=item *
+
+L<B::Deparse> has been upgraded from version 1.28 to 1.29.
+
+Parenthesised arrays in lists passed to C<\> are now correctly deparsed
+with parentheses (e.g., C<\(@a, (@b), @c)> now retains the parentheses
+around @b), this preserving the flattening behaviour of referenced
+parenthesised arrays.  Formerly, it only worked for one array: C<\(@a)>.
+
+C<local our> is now deparsed correctly, with the C<our> included.
+
+C<for($foo; !$bar; $baz) {...}> was deparsed without the C<!> (or C<not>).
+This has been fixed.
+
+Core keywords that conflict with lexical subroutines are now deparsed with
+the C<CORE::> prefix.
+
+C<foreach state $x (...) {...}> now deparses correctly with C<state> and
+not C<my>.
+
+C<our @array = split(...)> now deparses correctly with C<our> in those
+cases where the assignment is optimised away.
+
+=item *
+
+L<DynaLoader> has been upgraded from version 1.26 to 1.27.
+
+Remove dl_nonlazy global if unused in Dynaloader. [perl #122926]
+
+=item *
+
+L<Fcntl> has been upgraded from version 1.12 to 1.13.
+
+Add support for the Linux pipe buffer size fcntl() commands.
+
+=item *
+
 L<Module::CoreList> has been upgraded from version 5.20140920 to 5.20141020.
 
 Updated to cover the latest releases of Perl.
 
+=item *
+
+L<XSLoader> has been upgraded from version 0.17 to 0.18.
+
+Allow XSLoader to load modules from a different namespace.
+[perl #122455]
+
 =back
 
 =head2 Removed Modules and Pragmata
@@ -176,7 +260,12 @@ section.
 
 =item *
 
-XXX Description of the change here
+Clarifications have been added to L<perlrecharclass/Character Ranges>
+to the effect that Perl guarantees that C<[A-Z]>, C<[a-z]>, C<[0-9]> and
+any subranges thereof in regular expression bracketed character classes
+are guaranteed to match exactly what a naive English speaker would
+expect them to match, even on platforms (such as EBCDIC) where special
+handling is required to accomplish this.
 
 =back
 
@@ -222,7 +311,8 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+'"my" variable &foo::bar can't be in a package' has been reworded to say
+'subroutine' instead of 'variable'.
 
 =back
 
@@ -323,9 +413,15 @@ L</Modules and Pragmata> section.
 
 =over 4
 
-=item XXX-some-platform
+=item EBCDIC
 
-XXX
+Special handling is required on EBCDIC platforms to get C<qr/[i-j]/> to
+match only C<"i"> and C<"j">, since there are 7 characters between the
+code points for C<"i"> and C<"j">.  This special handling had only been
+invoked when both ends of the range are literals.  Now it is also
+invoked if any of the C<\N{...}> forms for specifying a character by
+name or Unicode code point is used instead of a literal.  See
+L<perlrecharclass/Character Ranges>.
 
 =back
 
@@ -341,7 +437,36 @@ well.
 
 =item *
 
-XXX
+SVs of type SVt_NV are now bodyless when a build configure and platform allow
+it, specifically C<sizeof(NV) <= sizeof(IV)>. The bodyless trick is the same one
+as for IVs since 5.9.2, but for NVs, unlike IVs, is not guarenteed on all
+platforms and build configurations.
+
+=item *
+
+The C<$DB::single>, C<$DB::signal> and C<$DB::trace> now have set and
+get magic that stores their values as IVs and those IVs are used when
+testing their values in C<pp_dbstate>.  This prevents perl from
+recursing infinity if an overloaded object is assigned to any of those
+variables. [perl #122445]
+
+=item *
+
+C<Perl_tmps_grow> which is marked as public API but undocumented has been
+removed from public API. If you use C<EXTEND_MORTAL> macro in your XS code to
+preextend the mortal stack, you are unaffected by this change.
+
+=item *
+
+C<cv_name>, which was introduced in 5.21.4, has been changed incompatibly.
+It now has a flags field that allows the caller to specify whether the name
+should be fully qualified.  See L<perlapi/cv_name>.
+
+=item *
+
+Internally Perl no longer uses the C<SVs_PADMY> flag.  C<SvPADMY()> now
+returns a true value for anything not marked PADTMP.  C<SVs_PADMY> is now
+defined as 0.
 
 =back
 
@@ -356,7 +481,52 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
 =item *
 
-XXX
+Locking and unlocking values via L<Hash::Util> or C<Internals::SvREADONLY>
+no longer has any affect on values that are read-only to begin.  Unlocking
+such values could result in crashes, hangs or other erratic behaviour.
+
+=item *
+
+The internal C<looks_like_number> function (which L<Scalar::Util> provides
+access to) began erroneously to return true for "-e1" in 5.21.4, affecting
+also C<-'-e1'>.  This has been fixed.
+
+=item *
+
+The flip-flop operator (C<..> in scalar context) would return the same
+scalar each time, unles the containing subroutine was called recursively.
+Now it always returns a new scalar.  [perl #122829]
+
+=item *
+
+Some unterminated C<(?(...)...)> constructs in regular expressions would
+either crash or give erroneous error messages.  C</(?(1)/> is one such
+example.
+
+=item *
+
+C<pack "w", $tied> no longer calls FETCH twice.
+
+=item *
+
+List assignments like C<($x, $z) = (1, $y)> now work correctly if $x and $y
+have been aliased by C<foreach>.
+
+=item *
+
+Some patterns including code blocks with syntax errors, such as
+C</ (?{(^{})/>, would hang or fail assertions on debugging builds.  Now
+they produce errors.
+
+=item *
+
+An assertion failure when parsing C<sort> with debugging enabled has been
+fixed.  [perl #122771]
+
+=item *
+
+C<*a = *b; @a = split //, $b[1]> could do a bad read and produce junk
+results.
 
 =back