This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta updates
[perl5.git] / pod / perldelta.pod
index 136f897..7a093b0 100644 (file)
@@ -5,16 +5,16 @@
 [ 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.17.1
+perldelta - what is new for perl v5.17.2
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.17.0 release and
-the 5.17.1 release.
+This document describes differences between the 5.17.1 release and
+the 5.17.2 release.
 
-If you are upgrading from an earlier release such as 5.16.0, first read
-L<perl5170delta>, which describes differences between 5.16.0 and
-5.17.0.
+If you are upgrading from an earlier release such as 5.17.0, first read
+L<perl5171delta>, which describes differences between 5.17.0 and
+5.17.1.
 
 =head1 Notice
 
@@ -28,6 +28,14 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
+=head2 C<kill> with negative signal names
+
+C<kill> has always allowed a negative signal number, which kills the
+process group instead of a single process.  It has also allowed signal
+names.  But it did not behave consistently, because negative signal names
+were treated as 0.  Now negative signals names like C<-INT> are supported
+and treated the same way as -2 [perl #112990].
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -44,13 +52,7 @@ XXX For a release on a stable branch, this section aspires to be:
     If any exist, they are bugs, and we request that you submit a
     report.  See L</Reporting Bugs> below.
 
-=head2 C<\N{BELL}> now refers to U+1F514 instead of U+0007
-
-Unicode 6.0 reused the name "BELL" for a different code point than it
-traditionally had meant.  Since Perl v5.14, use of this name still
-referred to U+0007, but would raise a deprecated warning.  Now, "BELL"
-refers to U+1F514, and the name for U+0007 is "ALERT".  All the
-functions in L<charnames> have been correspondingly updated.
+[ List each incompatible change as a =head2 entry ]
 
 =head1 Deprecations
 
@@ -103,42 +105,42 @@ XXX
 
 =item *
 
-L<ExtUtils::CBuilder> has been upgraded from version 0.280206 to 0.280208.
+L<File::stat> has been upgraded from version 1.06 to 1.07.
 
-Manifest files are now correctly embedded for those versions of VC++ which
-make use of them.
+Previously C<File::stat>'s overloaded C<-x> and C<-X> operators did not give
+the correct results for directories or executable files when running as
+root. They had been treating executable permissions for root just like for
+any other user, performing group membership tests I<etc> for files not owned
+by root. They now follow the correct Unix behaviour - for a directory they
+are always true, and for a file if any of the three execute permission bits
+are set then they report that root can execute the file. Perl's builtin
+C<-x> and C<-X> operators have always been correct.
 
 =item *
 
-L<File::DosGlob> has been upgraded from version 1.07 to 1.08.
+L<Tie::StdHandle> has been upgraded from version 4.2 to 4.3.
 
-There are no visible changes, only minor internal refactorings.
+C<READ> now respects the offset argument to C<read> [perl #112826].
 
 =item *
 
-L<File::Spec::Unix> has been upgraded from version 3.39_02 to 3.39_03.
+L<IO> has been upgraded from version 1.25_07 to 1.25_08.
 
-C<abs2rel> could produce incorrect results when given two relative paths or
-the root directory twice [perl #111510].
+L<IO::Socket> tries harder to cache or otherwise fetch socket
+information.
 
 =item *
 
-L<IO> has been upgraded from version 1.25_06 to version 1.25_07.
-
-C<sync()> can now be called on read only file handles [perl #64772].
+L<Storable> has been upgraded from version 2.36 to 2.37.
 
-=item *
-
-L<Pod::Html> has been upgraded from version 1.15_02 to 1.16.
+Restricted hashes were not always thawed correctly [perl #73972].
 
-The option C<--libpods> has been re-instated. It is deprecated, and its use
-does nothing other than issue a warning that it is no longer supported.
+Storable would croak when freezing a blessed REF object with a
+C<STORABLE_freeze()> method [perl #113880].
 
 =item *
 
-L<Unicode::UCD> has been upgraded from version 0.43 to version 0.44.
-This adds a function L<all_casefolds()|Unicode::UCD/all_casefolds()>
-that returns all the casefolds.
+L<Socket> has been upgraded from version 2.001 to 2.002.
 
 =back
 
@@ -171,13 +173,13 @@ XXX Changes which significantly change existing files in F<pod/> go here.
 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
 section.
 
-=head3 L<XXX>
+=head3 L<perlfunc>
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+Clarified documentation of C<our>.
 
 =back
 
@@ -208,7 +210,20 @@ XXX Newly added diagnostic messages go here
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<Group name must start with a non-digit word character in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Group name must start with a non-digit word character in regex; marked by <-- HERE in m/%s/">
+
+This error has been added for C<(?&0)>, which is invalid.  It used to
+produce an incomprehensible error message [perl #101666].
+
+=item *
+
+L<Can't use an undefined value as a subroutine reference|perldiag/"Can't use an undefined value as %s reference">
+
+Calling an undefined value as a subroutine now produces this error message.
+It used to, but was accidentally disabled, first in Perl 5.004 for
+non-magical variables, and then in Perl 5.14 for magical (e.g., tied)
+variables.  It has now been restored.  In the mean time, undef was treated
+as an empty string [perl #113576].
 
 =back
 
@@ -218,7 +233,17 @@ XXX L<message|perldiag/"message">
 
 =item *
 
-XXX L<message|perldiag/"message">
+C<chr()> now warns when passed a negative value [perl #83048].
+
+=item *
+
+C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
+value will be truncated rather than overflowing) [perl #40605].
+
+=item *
+
+Running perl with the C<-i> flag now warns if no input files are provided on
+the command line [perl #113410].
 
 =back
 
@@ -230,7 +255,13 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+The 'Can't use "my %s" in sort comparison' error has been downgraded to a
+warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
+for state variables).  In addition, the heuristics for guessing whether
+lexical $a or $b has been misused have been improved to generate fewer
+false positives.  Lexical $a and $b are no longer disallowed if they are
+outside the sort block.  Also, a named unary or list operator inside the
+sort block no longer causes the $a or $b to be ignored [perl #86136].
 
 =back
 
@@ -266,7 +297,9 @@ L</Platform Support> section, instead.
 
 =item *
 
-XXX
+Building perl with some Windows compilers used to fail due to a problem
+with miniperl's C<glob> operator (which uses the C<perlglob> program)
+deleting the PATH environment variable [perl #113798].
 
 =back
 
@@ -304,9 +337,8 @@ source tree.
 
 =over 4
 
-=item XXX-some-platform
+=item XXX
 
-XXX
 
 =back
 
@@ -331,10 +363,19 @@ L</Modules and Pragmata> section.
 
 =over 4
 
-=item Win32
+=item VMS
+
+Quotes are now removed from the command verb (but not the parameters) for commands
+spawned via C<system>, backticks, or a piped C<open>.  Previously, quotes on the verb 
+were passed through to DCL, which would fail to recognize the command.  Also, if the
+verb is actually a path to an image or command procedure on an ODS-5 volume, quoting it
+now allows the path to contain spaces.
 
-C<link> on Win32 now attempts to set C<$!> to more appropriate values
-based on the Win32 API error code. [perl #112272]
+=item AIX
+
+Configure now always adds -qlanglvl=extc99 to the CC flags on AIX when
+using xlC.  This will make it easier to compile a number of XS-based modules
+that assume C99 [perl #113778].
 
 =back
 
@@ -350,7 +391,18 @@ be noted as well.
 
 =item *
 
-XXX
+OP allocation for CVs now uses a slab allocator.  This simplifies
+memory management for OPs allocated to a CV, so cleaning up after a
+compilation error is simpler and safer [perl #111462][perl #112312].
+
+=item *
+
+PERL_DEBUG_READONLY_OPS has been rewritten to work with the new slab
+allocator, allowing it to catch more violations that befor.
+
+=item *
+
+The old slab allocator for ops, which was only enabled for PERL_IMPLICIT_SYS and PERL_DEBUG_READONLY_OPS, has been retired.
 
 =back
 
@@ -366,32 +418,204 @@ L</Modules and Pragmata>.
 
 =item *
 
-Perl now works as well as can be expected on all releases of Unicode so
-far.  In v5.16, it worked on Unicodes 6.0 and 6.1, but there were
-various bugs for earlier releases; the older the release the more
-problems.
+A regression introduced in v5.14.0 has been fixed, in which some calls
+to the C<re> module would clobber C<$_> [perl #113750].
+
+=item *
+
+C<do FILE> now always either sets or clears C<$@>, even when the file can't be
+read. This ensures that testing C<$@> first (as recommended by the
+documentation) always returns the correct result.
+
+=item *
+
+The array iterator used for the C<each @array> construct is now correctly
+reset when C<@array> is cleared (RT #75596). This happens for example when the
+array is globally assigned to, as in C<@array = (...)>, but not when its
+B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
+will now reset the iterator.
+
+This mirrors the behaviour of the hash iterator when the hash is cleared.
+
+=item *
+
+C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
+correct results, regardless of whether that package referred to by C<$class>
+exists [perl #47113].
+
+=item *
+
+Arriving signals no longer clear C<$@> [perl #45173].
+
+=item *
+
+Allow C<my ()> declarations with an empty variable list [perl #113554].
+
+=item *
+
+During parsing, subs declared after errors no longer leave stubs
+[perl #113712].
+
+=item *
+
+Closures containing no string evals no longer hang on to their containing
+subroutines, allowing variables closed over by outer subroutines to be
+freed when the outer sub is freed, even if the inner sub still exists
+[perl #89544].
+
+=item *
+
+Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
+stopped working properly in 5.16.0.  It was causing the new handle to
+reference a different scalar variable.  This has been fixed [perl #113764].
+
+=item *
+
+C<qr//> expressions no longer crash with custom regular expression engines
+that do not set C<offs> at regular expression compilation time
+[perl #112962].
+
+=item *
+
+C<delete local> no longer crashes with certain magical arrays and hashes
+[perl #112966].
+
+=item *
+
+C<local> on elements of certain magical arrays and hashes used not to
+arrange to have the element deleted on scope exit, even if the element did
+not exist before C<local>.
 
 =item *
 
-C<vec> no longer produces "uninitialized" warnings in lvalue context
-[perl #9423].
+C<scalar(write)> no longer returns multiple items [perl #73690].
 
 =item *
 
-On optimisation involving fixed strings in regular expressions could cause
-a severe performance penalty in edge cases.  This has been fixed
-[perl #76546].
+String to floating point conversions no longer misparse certain strings under
+C<use locale> [perl #109318].
+
+=item *
+
+C<@INC> filters that die no longer leak memory [perl #92252].
+
+=item *
+
+The implementations of overloaded operations are now called in the correct
+context. This allows, among other things, being able to properly override
+C<< <> >> [perl #47119].
+
+=item *
+
+Specifying only the C<fallback> key when calling C<use overload> now behaves
+properly [perl #113010].
+
+=item *
+
+C<< sub foo { my $a = 0; while ($a) { ... } } >> and
+C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
+
+=item *
+
+Fixed the debugger C<l> and C<M> commands, and other debugger
+functionality which was broken in 5.17.0 [perl #113918].
+
+=item *
+
+String negation now behaves the same under C<use integer;> as it does
+without [perl #113012].
+
+=item *
+
+C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
+regardless of the internal representation.  -1 used to wrap if the argument
+was tied or a string internally.
+
+=item *
+
+Using a C<format> after its enclosing sub was freed could crash as of
+perl 5.12.0, if the format referenced lexical variables from the outer sub.
+
+=item *
+
+Using a C<format> after its enclosing sub was undefined could crash as of
+perl 5.10.0, if the format referenced lexical variables from the outer sub.
+
+=item *
+
+Using a C<format> defined inside a closures, which format references
+lexical variables from outside, never really worked unless the C<write>
+call was directly inside the closure.  In 5.10.0 it even started crashing.
+Now the copy of that closure nearest the top of the call stack is used to
+find those variables.
+
+=item *
+
+Formats that close over variables in special blocks no longer crash if a
+stub exists with the same name as the special block before the special
+block is compiled.
+
+=item *
+
+The parser no longer gets confused, treating C<eval foo ()> as a syntax
+error if preceded by C<print;> [perl #16249].
+
+=item *
+
+The return value of C<syscall> is no longer truncated on 64-bit platforms
+[perl #113980].
+
+=item *
+
+Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
+FOO handle [perl #78064].
+
+=item *
+
+C<do subname> now calls the named subroutine and uses the file name it
+returns, instead of opening a file named "subname".
+
+=item *
+
+Subroutines looked up by rv2cv check hooks (registered by XS modules) are
+now taken into consideration when determining whether C<foo bar> should be
+the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
+
+=item *
+
+C<CORE::foo::bar> is no longer treated specially, allowing global overrides
+to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
+
+=item *
+
+Calling an undefined sub whose typeglob has been undefined now produces the
+customary "Undefined subroutine called" error, instead of "Not a CODE
+reference".
+
+=item *
+
+Two bugs involving @ISA have been fixed.  C<*ISA = *glob_without_array> and
+C<undef *ISA; @{*ISA}> would prevent future modifications to @ISA from
+updating the internal caches used to look up methods.  The
+*glob_without_array case was a regression from Perl 5.12.
+
+=item *
+
+Regular expression optimisations sometimes caused C<$> with C</m> to
+produce failed or incorrect matches [perl #114068].
+
+=item *
+
+C<__SUB__> now works in a C<sort> block when the enclosing subroutine is
+predeclared with C<sub foo;> syntax [perl #113710].
 
 =back
 
 =head1 Known Problems
 
 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
-tests that had to be C<TODO>ed for the release would be noted here, unless
-they were specific to a particular platform (see below).
-
-This is a list of some significant unfixed bugs, which are regressions
-from either 5.XXX.XXX or 5.XXX.XXX.
+tests that had to be C<TODO>ed for the release would be noted here. Unfixed
+platform specific bugs also go here.
 
 [ List each fix as a =item entry ]
 
@@ -412,7 +636,7 @@ here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.17.0..HEAD
+  perl Porting/acknowledgements.pl v5.17.1..HEAD
 
 =head1 Reporting Bugs