incorporate perl5197delta into perl5200delta
authorRicardo Signes <rjbs@cpan.org>
Fri, 11 Apr 2014 22:03:42 +0000 (18:03 -0400)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 May 2014 14:56:44 +0000 (10:56 -0400)
Porting/perl5200delta.pod

index c8955c2..8c6f850 100644 (file)
@@ -91,6 +91,8 @@ equivalencies are set up:
   $cref->&*;  # same as &{ $cref }
   $gref->**;  # same as *{ $gref }
 
+  $aref->$#*; # same as $#{ $aref }
+
   $gref->*{ $slot }; # same as *{ $gref }{ $slot }
 
   $aref->@[ ... ];  # same as @$aref[ ... ]  # interpolates
@@ -195,6 +197,18 @@ numeric values under the hood.)
 These two functions, undocumented, unused in CPAN, and problematic, have been
 removed.
 
+=head2 Data::Dumper's output may change
+
+Depending on the data structures dumped and the settings set for
+Data::Dumper, the dumped output may have changed from previous
+versions.
+
+If you have tests that depend on the exact output of Data::Dumper,
+they may fail.
+
+To avoid this problem in your code, test against the data structure
+from evaluating the dumped structure, instead of the dump itself.
+
 =head1 Deprecations
 
 The C</\C/> regular expression character class is deprecated. From perl
@@ -217,8 +231,6 @@ everywhere, \cT is whitespace in EBCDIC.  [perl #119123]
 
 =head2 Module removals
 
-XXX Remove this section if inapplicable.
-
 The following modules will be removed from the core distribution in a
 future release, and will at that time need to be installed from CPAN.
 Distributions on CPAN which require these modules will need to list them as
@@ -235,6 +247,8 @@ not usually on concerns over their design.
 
 =over
 
+=item L<CGI>
+
 =item L<Package::Constants>
 
 =back
@@ -807,6 +821,12 @@ name and via the prototype attribute.  The prototype in parentheses is useless,
 since it will be replaced by the prototype from the attribute before it's ever
 used.
 
+=item *
+
+L<Useless use of greediness modifier|perldiag/"Useless use of greediness modifier '%c' in regex; marked by <-- HERE in m/%s/">
+
+This fixes [Perl #42957].
+
 =back
 
 =head2 Changes to Existing Diagnostics
@@ -891,6 +911,12 @@ L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol
 The description for this diagnostic has been extended to cover all cases where the warning may occur.
 Issues with the positioning of the arrow indicator have also been resolved.
 
+=item *
+
+The error messages for C<my($a?$b$c)> and C<my(do{})> now mention "conditional
+expression" and "do block", respectively, instead of reading 'Can't declare
+null operation in "my"'.
+
 =back
 
 =head1 Utility Changes
@@ -1087,6 +1113,12 @@ across signal handlers by the Win32 signal emulation code.
 The test script F<t/x2p/find2perl.t> has been added to test the F<find2perl>
 program on platforms where it is practical to do so.
 
+=item *
+
+Various tests in F<t/porting/> are no longer skipped when the perl
+F<.git> directory is outside the perl tree and pointed to by
+C<$GIT_DIR>. [perl #120505]
+
 =back
 
 =head1 Platform Support
@@ -1214,6 +1246,11 @@ Experimental support for building with Intel C++ Compiler has been added. Only
 the nmake makefile (win32/Makefile) can be used. A "nmake test" will not pass
 at this time due to "cpan/CGI/t/url.t".
 
+=item Windows
+
+Experimental support for building with Intel C++ Compiler has been extended to
+cover the dmake makefile (win32/makefile.mk) as well.
+
 =item WinCE
 
 Perl can now be built in one shot with no user intervention on WinCE by running
@@ -1414,6 +1451,32 @@ Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
 compilers to emulate the aliasing of C<bool> to C<char> that perl does for
 C89 compilers.  [perl #120314]
 
+=item *
+
+The C<sv> argument in L<perlapi/sv_2pv_flags>, L<perlapi/sv_2iv_flags>,
+L<perlapi/sv_2uv_flags>, and L<perlapi/sv_2nv_flags> and their older wrappers
+sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now non-NULL. Passing NULL now will crash.
+When the non-NULL marker was introduced en masse in 5.9.3 the functions
+were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if
+NULL was passed, the functions returned 0 or false-type values. The code that
+supports C<sv> argument being non-NULL dates to 5.0 alpha 2 directly, and
+indirectly to Perl 1.0 (pre 5.0 api). The lack of documentation that the
+functions accepted a NULL C<sv> was corrected in 5.11.0 and between 5.11.0
+and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code
+has now been removed, and the functions became non-NULL marked again, because
+core getter-type macros never pass NULL to these functions and would crash
+before ever passing NULL.
+
+The only way a NULL C<sv> can be passed to sv_2*v* functions is if XS code
+directly calls sv_2*v*. This is unlikely as XS code uses Sv*V* macros to get
+the underlying value out of the SV. One possible situation which leads to
+a NULL C<sv> being passed to sv_2*v* functions, is if XS code defines its own
+getter type Sv*V* macros, which check for NULL B<before> dereferencing and
+checking the SV's flags through public API Sv*OK* macros or directly using
+private API C<SvFLAGS>, and if C<sv> is NULL, then calling the sv_2*v functions
+with a NULL litteral or passing the C<sv> containing a NULL value.
+
+
 =back
 
 =head1 Selected Bug Fixes
@@ -2275,6 +2338,87 @@ perls, pure NOK vars) would generally do the wrong thing in formats
 when the var is treated as a string and repeatedly chopped, as in
 ^<<<~~ and similar. This has now been resolved.
 
+=item *
+
+C<< semctl(..., SETVAL, ...) >> would set the semaphore to the top
+32-bits of the supplied integer instead of the bottom 32-bits on
+64-bit big-endian systems. [perl #120635]
+
+=item *
+
+A regression since v5.18.0 has been fixed in which C<qr/[[:^ascii:]]/d>
+failed to match any character in the range C<\x80> - C<\xFF> if its
+surrounding character class contained anything else.  (That is, the bug
+didn't happen if the C<[:^ascii:]> was the only element of the character
+class.) [perl #120799]
+
+=item *
+
+C<< readdir() >> now only sets C<$!> on error.  C<$!> is no longer set
+to C<EBADF> when then terminating C<undef> is read from the directory
+unless the system call sets C<$!>. [perl #118651]
+
+=item *
+
+C<&CORE::glob> no longer causes an intermittent crash due to perl's stack
+getting corrupted. [perl #119993]
+
+=item *
+
+C<open> with layers that load modules (e.g., "<:encoding(utf8)") no longer
+runs the risk of crashing due to stack corruption.
+
+=item *
+
+When a reference to a reference to an overloaded object was returned from
+a regular expression C<(??{...})> code block, an incorrect implicit
+dereference could take place if the inner reference had been returned by
+a code block previously.
+
+=item *
+
+A tied variable returned from C<(??{...})> sees the inner values of match
+variables (i.e., the $1 etc. from any matches inside the block) in its
+FETCH method.  This was not the case if a reference to an overloaded object
+was the last thing assigned to the tied variable.  Instead, the match
+variables referred to the outer pattern during the FETCH call.
+
+=item *
+
+Perl 5.18 broke autoloading via C<< ->SUPER::foo >> method calls by looking
+up AUTOLOAD from the current package rather than the current package's
+superclass.  This has been fixed. [perl #120694]
+
+=item *
+
+A longstanding bug causing C<do {} until CONSTANT>, where the constant
+holds a true value, to read unallocated memory has been resolved.  This
+would usually happen after a syntax error.  In past versions of Perl it has
+crashed intermittently. [perl #72406]
+
+=item *
+
+Fix HP-UX $! failure. HP-UX strerror() returns an empty string for an
+unknown error code.  This caused an assertion to fail under DEBUGGING
+builds.  This patch removes the assertion and changes the return into
+a non-empty string indicating the errno is for an unknown error.
+
+=item *
+
+Fix unexpected tainting via regexp using locale. Previously, under certain
+conditions, the use of character classes could cause tainting when it
+shouldn't. Some character classes are locale-dependent, but before this
+patch, sometimes tainting was happening even for character classes that
+don't depend on the locale. [perl #120675]
+
+=item *
+
+Under certain conditions, Perl would throw an error if in an lookbehind
+assertion in a regexp, the assertion referred to a named subpattern,
+complaining the lookbehind was variable when it wasn't. This has been
+fixed. [perl #120600], [perl #120618]. The current fix may be improved
+on in the future.
+
 =back
 
 =head1 Known Problems