This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: Fix typo
[perl5.git] / pod / perldelta.pod
index 6571d26..9e70c03 100644 (file)
@@ -5,15 +5,15 @@
 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
 to be processed before release. ]
 
-perldelta - what is new for perl v5.25.4
+perldelta - what is new for perl v5.25.9
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.25.3 release and the 5.25.4
+This document describes differences between the 5.25.8 release and the 5.25.9
 release.
 
-If you are upgrading from an earlier release such as 5.25.2, first read
-L<perl5253delta>, which describes differences between 5.25.2 and 5.25.3.
+If you are upgrading from an earlier release such as 5.25.7, first read
+L<perl5258delta>, which describes differences between 5.25.7 and 5.25.8.
 
 =head1 Notice
 
@@ -25,7 +25,14 @@ XXX New core language features go here.  Summarize user-visible core language
 enhancements.  Particularly prominent performance optimisations could go
 here, but most should go in the L</Performance Enhancements> section.
 
-[ List each enhancement as a =head2 entry ]
+=head2 New regular expression modifier C</xx>
+
+Specifying two C<x> characters to modify a regular expression pattern
+does everything that a single one does, but additionally TAB and SPACE
+characters within a bracketed character class are generally ignored and
+can be added to improve readability, like
+S<C</[ ^ A-Z d-f p-x ]/xx>>.  Details are at
+L<perlre/E<sol>x and E<sol>xx>.
 
 =head1 Security
 
@@ -47,7 +54,15 @@ XXX For a release on a stable branch, this section aspires to be:
 
 =head1 Deprecations
 
-XXX Any deprecated features, syntax, modules etc. should be listed here.
+=head2 String delimiters that aren't stand-alone graphemes are now
+deprecated
+
+In order for Perl to eventually allow string delimiters to be Unicode
+grapheme clusters (which look like a single character, but may be
+a sequence of several ones), we have to stop allowing a single char
+delimiter that isn't a grapheme by itself.  These are unlikely to exist
+in actual code, as they would typically display as attached to the
+character in front of them.
 
 =head2 Module removals
 
@@ -89,9 +104,7 @@ There may well be none in a stable release.
 
 =item *
 
-The rather slow implementation for the experimental subroutine signatures
-feature has been made much faster; it is now comparable in speed with the
-old-style C<my ($a, $b, @c) = @_>.
+XXX
 
 =back
 
@@ -125,7 +138,107 @@ L<XXX> has been upgraded from version A.xx to B.yy.
 
 =item *
 
-L<NEXT> has been upgraded from version 0.65 to 0.67.
+L<re> has been upgraded from version 0.33 to 0.34;
+
+This adds support for the new L<C</xx>|perlre/E<sol>x and E<sol>xx>
+regular expression pattern modifier, and a change to the L<S<C<use re
+'strict'>>|re/'strict' mode> experimental feature.  When S<C<re
+'strict'>> is enabled, a warning now will be generated for all
+unescaped uses of the two characters C<}> and C<]> in regular
+expression patterns (outside bracketed character classes) that are taken
+literally.  This brings them more in line with the C<)> character which
+is always a metacharacter unless escaped.  Being a metacharacter only
+sometimes, depending on action at a distance, can lead to silently
+having the pattern mean something quite different than was intended,
+which the S<C<re 'strict'>> mode is intended to minimize.
+
+=item *
+
+L<B::Xref> has been upgraded from version 1.05 to 1.06.
+
+=item *
+
+L<Compress::Raw::Bzip2> has been upgraded from version 2.069 to 2.070.
+
+=item *
+
+L<Compress::Raw::Zlib> has been upgraded from version 2.069 to 2.070.
+
+=item *
+
+L<DB_File> has been upgraded from version 1.838 to 1.840.
+
+=item *
+
+L<Devel::SelfStubber> has been upgraded from version 1.05 to 1.06.
+
+=item *
+
+L<diagnostics> has been upgraded from version 1.35 to 1.36.
+
+=item *
+
+L<DynaLoader> has been upgraded from version 1.40 to 1.41.
+
+=item *
+
+L<Errno> has been upgraded from version 1.27 to 1.28.
+
+=item *
+
+L<ExtUtils::Embed> has been upgraded from version 1.33 to 1.34.
+
+=item *
+
+L<I18N::LangTags> has been upgraded from version 0.41 to 0.42.
+
+=item *
+
+L<lib> has been upgraded from version 0.63 to 0.64.
+
+=item *
+
+L<Module::CoreList> has been upgraded from version 5.20161220 to 5.20170120.
+
+=item *
+
+L<OS2::Process> has been upgraded from version 1.11 to 1.12.
+
+=item *
+
+L<perl5db.pl> has been upgraded from version 1.50 to 1.51.
+
+=item *
+
+L<Storable> has been upgraded from version 2.59 to 2.61.
+
+=item *
+
+L<Symbol> has been upgraded from version 1.07 to 1.08.
+
+=item *
+
+L<Term::ReadLine> has been upgraded from version 1.15 to 1.16.
+
+=item *
+
+L<Test> has been upgraded from version 1.29 to 1.30.
+
+=item *
+
+L<threads::shared> has been upgraded from version 1.52 to 1.53.
+
+=item *
+
+L<Unicode::UCD> has been upgraded from version 0.67 to 0.68.
+
+=item *
+
+L<VMS::DCLsym> has been upgraded from version 1.07 to 1.08.
+
+=item *
+
+L<XSLoader> has been upgraded from version 0.24 to 0.26.
 
 =back
 
@@ -204,13 +317,108 @@ XXX L<message|perldiag/"message">
 
 =head2 Changes to Existing Diagnostics
 
-XXX Changes (i.e. rewording) of diagnostic messages go here
+As of Perl 5.25.9, all new deprecations will come with a version in
+which the feature will disappear. And with a few exceptions, most
+existing deprecations will state when they'll disappear. As such, most
+deprecation messages have changed.
 
 =over 4
 
 =item *
 
-XXX Describe change here
+Attribute "locked" is deprecated, and will disappear in Perl 5.28
+
+=item *
+
+Attribute "unique" is deprecated, and will disappear in Perl 5.28
+
+=item *
+
+"\c%c" is more clearly written simply as "%s". This will be a fatal error
+in Perl 5.28
+
+=item *
+
+Constants from lexical variables potentially modified elsewhere are
+deprecated. This will not be allowed in Perl 5.32
+
+=item *
+
+Deprecated use of my() in false conditional. This will be a fatal error
+in Perl 5.30
+
+=item *
+
+dump() better written as CORE::dump(). dump() will no longer be available 
+in Perl 5.30
+
+=item *
+
+${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28
+
+=item *
+
+File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob()
+instead.
+
+=item *
+
+%s() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30
+
+=item *
+
+$* is no longer supported. Its use will be fatal in Perl 5.30
+
+=item *
+
+$* is no longer supported. Its use will be fatal in Perl 5.30
+
+=item *
+
+Opening dirhandle %s also as a file. This will be a fatal error in Perl 5.28
+
+=item *
+
+Opening filehandle %s also as a directory. This will be a fatal
+error in Perl 5.28
+
+=item *
+
+Setting $/ to a reference to %s as a form of slurp is deprecated,
+treating as undef. This will be fatal in Perl 5.28
+
+=item *
+
+Unescaped left brace in regex is deprecated here (and will be fatal
+in Perl 5.30), passed through in regex; marked by S<<-- HERE> in m/%s/
+
+=item *
+
+Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28
+
+=item *
+
+Use of bare << to mean <<"" is deprecated. Its use will be fatal in Perl 5.28
+
+=item *
+
+Use of code point 0x%s is deprecated; the permissible max is 0x%s.
+This will be fatal in Perl 5.28
+
+=item *
+
+Use of comma-less variable list is deprecated. Its use will be fatal
+in Perl 5.28
+
+=item *
+
+Use of inherited AUTOLOAD for non-method %s() is deprecated. This
+will be fatal in Perl 5.28
+
+=item * 
+
+Use of strings with code points over 0xFF as arguments to %s operator
+is deprecated. This will be a fatal error in Perl 5.28
 
 =back
 
@@ -246,7 +454,49 @@ L</Platform Support> section, instead.
 
 =item *
 
-XXX
+The C<dtrace> build process has further changes:
+
+=over
+
+=item *
+
+If the C<-xnolibs> is available, use that so a F<dtrace> perl can be
+built within a FreeBSD jail.
+
+=item *
+
+On systems that build a dtrace object file (FreeBSD, Solaris and
+SystemTap's dtrace emulation), copy the input objects to a separate
+directory and process them there, and use those objects in the link,
+since C<dtrace -G> also modifies these objects.
+
+=item *
+
+Add libelf to the build on FreeBSD 10.x, since dtrace adds references
+to libelf symbols.
+
+=item *
+
+Generate a dummy dtrace_main.o if C<dtrace -G> fails to build it.  A
+default build on Solaris generates probes from the unused inline
+functions, while they don't on FreeBSD, which causes C<dtrace -G> to
+fail.
+
+=back
+
+[perl #130108]
+
+=item *
+
+You can now disable perl's use of the PERL_HASH_SEED and
+PERL_PERTURB_KEYS environment variables by configureing perl with
+C<-Accflags=NO_PERL_HASH_ENV>.
+
+=item *
+
+You can now disable perl's use of the PERL_HASH_SEED_DEBUG environment
+variable by configuring perl with
+C<-Accflags=-DNO_PERL_HASH_SEED_DEBUG>.
 
 =back
 
@@ -329,77 +579,70 @@ well.
 
 =item *
 
-Three new ops, C<OP_ARGELEM>, C<OP_ARGDEFELEM> and C<OP_ARGCHECK> have
-been added. These are intended principally to implement the individual
-elements of a subroutine signature, plus any overall checking required.
-
-=back
-
-=head1 Selected Bug Fixes
-
-XXX Important bug fixes in the core language are summarized here.  Bug fixes in
-files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
-
-[ List each fix as a =item entry ]
-
-=over 4
+New versions of macros like C<isALPHA_utf8> and C<toLOWER_utf8>  have
+been added, each with the
+suffix C<_safe>, like C<isSPACE_utf8_safe>.  These take an extra
+parameter, giving an upper limit of how far into the string it is safe
+to read.  Using the old versions could cause attempts to read beyond the
+end of the input buffer if the UTF-8 is not well-formed, and ther use
+now raises a deprecation warning.  Details are at
+L<perlapi/Character classification>.
 
 =item *
 
-Problems with in-place array sorts: code like C<@a = sort { ... } @a>,
-where the source and destination of the sort are the same plain array, are
-optimised to do less copying around. Two side-effects of this optimisation
-were that the contents of C<@a> as visible to to sort routine were
-partially sorted, and under some circumstances accessing C<@a> during the
-sort could crash the interpreter. Both these issues have been fixed, and
-Sort functions see the original value of C<@a>.
+Calling macros like C<isALPHA_utf8> on malformed UTF-8 have issued a
+deprecation warning since Perl v5.18.  They now die.
+Similarly, macros like C<toLOWER_utf8> on malformed UTF-8 now die.
 
 =item *
 
-Non-ASCII string delimiters are now reported correctly in error messages
-for unterminated strings.  [perl #128701]
+Calling the functions C<utf8n_to_uvchr> and its derivatives, while
+passing a string length of 0 is now asserted against in DEBUGGING
+builds, and otherwise returns the Unicode REPLACEMENT CHARACTER.   If
+you have nothing to decode, you shouldn't call the decode function.
 
 =item *
 
-C<pack("p", ...)> used to emit its warning ("Attempt to pack pointer to
-temporary value") erroneously in some cases, but has been fixed.
+The functions C<utf8n_to_uvchr> and its derivatives now return the
+Unicode REPLACEMENT CHARACTER if called with UTF-8 that has the overlong
+malformation, and that malformation is allowed by the input parameters.
+This malformation is where the UTF-8 looks valid syntactically, but
+there is a shorter sequence that yields the same code point.  This has
+been forbidden since Unicode version 3.1.
 
 =item *
 
-C<@DB::args> is now exempt from "used once" warnings.  The warnings only
-occurred under B<-w>, because F<warnings.pm> itself uses C<@DB::args>
-multiple times.
+The functions C<utf8n_to_uvchr> and its derivatives now accept an input
+flag to allow the overflow malformation.  This malformation is when the
+UTF-8 may be syntactically valid, but the code point it represents is
+not capable of being represented in the word length on the platform.
+What "allowed" means in this case is that the function doesn't return an
+error, and advances the parse pointer to beyond the UTF-8 in question,
+but it returns the Unicode REPLACEMENT CHARACTER as the value of the
+code point (since the real value is not representable).
 
-=item *
-
-The use of built-in arrays or hash slices in a double-quoted string no
-longer issues a warning ("Possible unintended interpolation...") if the
-variable has not been mentioned before.  This affected code like
-C<qq|@DB::args|> and C<qq|@SIG{'CHLD', 'HUP'}|>.  (The special variables
-C<@-> and C<@+> were already exempt from the warning.)
+=back
 
-=item *
+=head1 Selected Bug Fixes
 
-C<gethostent> and similar functions now perform a null check internally, to
-avoid crashing with torsocks.  This was a regression from 5.22.  [perl
-#128740]
+XXX Important bug fixes in the core language are summarized here.  Bug fixes in
+files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
-=item *
+[ List each fix as a =item entry ]
 
-C<defined *{'!'}>, C<defined *{'['}>, and C<defined *{'-'}> no longer leak
-memory if the typeglob in question has never been accessed before.
+=over 4
 
 =item *
 
-In 5.25.4 fchown() was changed not to accept negative one as an argument
-because in some platforms that is an error.  However, in some other platforms
-that is an acceptable argument.  This change has been reverted [perl #128967].
+Under C<use utf8>, the entire Perl program is now checked that the UTF-8
+is wellformed.  This resolves [perl #126310].
 
 =item *
 
-Mentioning the same constant twice in a row (which is a syntax error) no
-longer fails an assertion under debugging builds.  This was a regression
-from 5.20.  [perl #126482]
+The range operator C<..> on strings now handles its arguments correctly when in
+the scope of the L<< C<unicode_strings>|feature/"The 'unicode_strings' feature" >>
+feature. The previous behaviour was sufficiently unexpected that we believe no
+correct program could have made use of it.
 
 =back
 
@@ -439,7 +682,7 @@ here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.25.3..HEAD
+  perl Porting/acknowledgements.pl v5.25.5..HEAD
 
 =head1 Reporting Bugs