| 1 | =encoding utf8 |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
| 5 | perl5214delta - what is new for perl v5.21.4 |
| 6 | |
| 7 | =head1 DESCRIPTION |
| 8 | |
| 9 | This document describes differences between the 5.21.3 release and the 5.21.4 |
| 10 | release. |
| 11 | |
| 12 | If you are upgrading from an earlier release such as 5.21.2, first read |
| 13 | L<perl5213delta>, which describes differences between 5.21.2 and 5.21.3. |
| 14 | |
| 15 | =head1 Core Enhancements |
| 16 | |
| 17 | =head2 Infinity and NaN (not-a-number) handling improved |
| 18 | |
| 19 | Floating point values are able to hold the special values infinity (also |
| 20 | -infinity), and NaN (not-a-number). Now we more robustly recognize and |
| 21 | propagate the value in computations, and on output normalize them to C<Inf> and |
| 22 | C<NaN>. |
| 23 | |
| 24 | See also the L<POSIX> enhancements. |
| 25 | |
| 26 | =head1 Security |
| 27 | |
| 28 | =head2 Perl is now compiled with -fstack-protector-strong if available |
| 29 | |
| 30 | Perl has been compiled with the anti-stack-smashing option |
| 31 | C<-fstack-protector> since 5.10.1. Now Perl uses the newer variant |
| 32 | called C<-fstack-protector-strong>, if available. |
| 33 | |
| 34 | =head1 Incompatible Changes |
| 35 | |
| 36 | =head2 Changes to the C<*> prototype |
| 37 | |
| 38 | The C<*> character in a subroutine's prototype used to allow barewords to take |
| 39 | precedence over most, but not all subroutines. It was never consistent and |
| 40 | exhibited buggy behaviour. |
| 41 | |
| 42 | Now it has been changed, so subroutines always take precedence over barewords, |
| 43 | which brings it into conformity with similarly prototyped built-in functions: |
| 44 | |
| 45 | sub splat(*) { ... } |
| 46 | sub foo { ... } |
| 47 | splat(foo); # now always splat(foo()) |
| 48 | splat(bar); # still splat('bar') as before |
| 49 | close(foo); # close(foo()) |
| 50 | close(bar); # close('bar') |
| 51 | |
| 52 | =head1 Performance Enhancements |
| 53 | |
| 54 | =over 4 |
| 55 | |
| 56 | =item * |
| 57 | |
| 58 | Subroutines with an empty prototype and bodies containing just C<undef> are now |
| 59 | eligible for inlining. |
| 60 | L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728> |
| 61 | |
| 62 | =item * |
| 63 | |
| 64 | Subroutines in packages no longer need to carry typeglobs around with them. |
| 65 | Declaring a subroutine will now put a simple sub reference in the stash if |
| 66 | possible, saving memory. The typeglobs still notionally exist, so accessing |
| 67 | them will cause the subroutine reference to be upgraded to a typeglob. This |
| 68 | optimization does not currently apply to XSUBs or exported subroutines, and |
| 69 | method calls will undo it, since they cache things in typeglobs. |
| 70 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> |
| 71 | |
| 72 | =back |
| 73 | |
| 74 | =head1 Modules and Pragmata |
| 75 | |
| 76 | =head2 New Modules and Pragmata |
| 77 | |
| 78 | =over 4 |
| 79 | |
| 80 | =item * |
| 81 | |
| 82 | L<B::Op_private> provides detailed information about the flags used in the |
| 83 | C<op_private> field of perl opcodes. |
| 84 | |
| 85 | =back |
| 86 | |
| 87 | =head2 Updated Modules and Pragmata |
| 88 | |
| 89 | =over 4 |
| 90 | |
| 91 | =item * |
| 92 | |
| 93 | L<Archive::Tar> has been upgraded from version 2.00 to 2.02. |
| 94 | |
| 95 | Tests can now be run in parallel. |
| 96 | |
| 97 | =item * |
| 98 | |
| 99 | L<Attribute::Handlers> has been upgraded from version 0.96 to 0.97. |
| 100 | |
| 101 | Internal changes to account for the fact that subroutines in packages no longer |
| 102 | need to carry typeglobs around with them (see under L</Performance |
| 103 | Enhancements>). |
| 104 | |
| 105 | =item * |
| 106 | |
| 107 | L<attributes> has been upgraded from version 0.22 to 0.23. |
| 108 | |
| 109 | The usage of C<memEQs> in the XS has been corrected. |
| 110 | L<[perl #122701]|https://rt.perl.org/Ticket/Display.html?id=122701> |
| 111 | |
| 112 | =item * |
| 113 | |
| 114 | L<B> has been upgraded from version 1.50 to 1.51. |
| 115 | |
| 116 | It provides a new C<B::safename> function, based on the existing |
| 117 | C<< B::GV->SAFENAME >>, that converts "\cOPEN" to "^OPEN". |
| 118 | |
| 119 | =item * |
| 120 | |
| 121 | L<B::Concise> has been upgraded from version 0.992 to 0.993. |
| 122 | |
| 123 | Internal changes to account for the fact that the defines and labels for the |
| 124 | flags in the C<op_private> field of OPs are now auto-generated (see under |
| 125 | L</Internal Changes>). |
| 126 | |
| 127 | =item * |
| 128 | |
| 129 | L<B::Deparse> has been upgraded from version 1.27 to 1.28. |
| 130 | |
| 131 | It now deparses C<our(I<LIST>)> and typed lexical (C<my Dog $spot>) correctly. |
| 132 | |
| 133 | =item * |
| 134 | |
| 135 | L<bignum> has been upgraded from version 0.37 to 0.38. |
| 136 | |
| 137 | An C<eval BLOCK> rather than an C<eval EXPR> is now used to see if we can find |
| 138 | Math::BigInt::Lite. |
| 139 | |
| 140 | =item * |
| 141 | |
| 142 | L<constant> has been upgraded from version 1.31 to 1.32. |
| 143 | |
| 144 | It now accepts fully-qualified constant names, allowing constants to be defined |
| 145 | in packages other than the caller. |
| 146 | |
| 147 | =item * |
| 148 | |
| 149 | L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128. |
| 150 | |
| 151 | Works around limitations in version::vpp detecting v-string magic and adds |
| 152 | support for forthcoming L<ExtUtils::MakeMaker> bootstrap F<version.pm> for |
| 153 | Perls older than 5.10.0. |
| 154 | |
| 155 | =item * |
| 156 | |
| 157 | L<Data::Dumper> has been upgraded from version 2.152 to 2.154. |
| 158 | |
| 159 | Fixes CVE-2014-4330 by adding a configuration variable/option to limit |
| 160 | recursion when dumping deep data structures. |
| 161 | |
| 162 | =item * |
| 163 | |
| 164 | L<experimental> has been upgraded from version 0.008 to 0.010. |
| 165 | |
| 166 | Hardcodes features for Perls older than 5.15.7. |
| 167 | |
| 168 | =item * |
| 169 | |
| 170 | L<ExtUtils::CBuilder> has been upgraded from version 0.280217 to 0.280219. |
| 171 | |
| 172 | Fixes a regression on Android. |
| 173 | L<[perl #122675]|https://rt.perl.org/Ticket/Display.html?id=122675> |
| 174 | |
| 175 | =item * |
| 176 | |
| 177 | L<ExtUtils::Install> has been upgraded from version 1.68 to 2.04. |
| 178 | |
| 179 | No changes to installed files other than version bumps. |
| 180 | |
| 181 | =item * |
| 182 | |
| 183 | L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.68. |
| 184 | |
| 185 | Fixes a bug with C<maniread()>'s handling of quoted filenames and improves |
| 186 | C<manifind()> to follow symlinks. |
| 187 | L<[perl #122415]|https://rt.perl.org/Ticket/Display.html?id=122415> |
| 188 | |
| 189 | =item * |
| 190 | |
| 191 | L<File::Find> has been upgraded from version 1.27 to 1.28. |
| 192 | |
| 193 | C<find()> and C<finddepth()> will now warn if passed inappropriate or |
| 194 | misspelled options. |
| 195 | |
| 196 | =item * |
| 197 | |
| 198 | L<Getopt::Std> has been upgraded from version 1.10 to 1.11. |
| 199 | |
| 200 | Corrects a typo in the documentation. |
| 201 | |
| 202 | =item * |
| 203 | |
| 204 | L<HTTP::Tiny> has been upgraded from version 0.047 to 0.049. |
| 205 | |
| 206 | C<keep_alive> is now fork-safe and thread-safe. |
| 207 | |
| 208 | =item * |
| 209 | |
| 210 | L<IO> has been upgraded from version 1.33 to 1.34. |
| 211 | |
| 212 | The XS implementation has been fixed for the sake of older Perls. |
| 213 | |
| 214 | =item * |
| 215 | |
| 216 | L<IO::Socket::IP> has been upgraded from version 0.31 to 0.32. |
| 217 | |
| 218 | Implements Timeout for C<connect()>. |
| 219 | L<[cpan #92075]|https://rt.cpan.org/Ticket/Display.html?id=92075> |
| 220 | |
| 221 | =item * |
| 222 | |
| 223 | L<Locale::Codes> has been upgraded from version 3.31 to 3.32. |
| 224 | |
| 225 | New codes have been added. |
| 226 | |
| 227 | =item * |
| 228 | |
| 229 | L<Math::BigInt> has been upgraded from version 1.9996 to 1.9997. |
| 230 | |
| 231 | The documentation now gives test examples using L<Test::More> rather than |
| 232 | L<Test>. |
| 233 | |
| 234 | =item * |
| 235 | |
| 236 | L<Module::CoreList> has been upgraded from version 5.021003 to 5.20140920. |
| 237 | |
| 238 | Updated to cover the latest releases of Perl. |
| 239 | |
| 240 | =item * |
| 241 | |
| 242 | L<overload> has been upgraded from version 1.22 to 1.23. |
| 243 | |
| 244 | A redundant C<ref $sub> check has been removed. |
| 245 | |
| 246 | =item * |
| 247 | |
| 248 | PathTools has been upgraded from version 3.49 to 3.50. |
| 249 | |
| 250 | A warning from the B<gcc> compiler is now avoided when building the XS. |
| 251 | |
| 252 | =item * |
| 253 | |
| 254 | L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24. |
| 255 | |
| 256 | Filehandles opened for reading or writing now have C<:encoding(UTF-8)> set. |
| 257 | L<[cpan #98019]|https://rt.cpan.org/Ticket/Display.html?id=98019> |
| 258 | |
| 259 | =item * |
| 260 | |
| 261 | L<POSIX> has been upgraded from version 1.42 to 1.43. |
| 262 | |
| 263 | The C99 math functions and constants (for example acosh, isinf, isnan, round, |
| 264 | trunc; M_E, M_SQRT2, M_PI) have been added. |
| 265 | |
| 266 | =item * |
| 267 | |
| 268 | Scalar-List-Utils has been upgraded from version 1.39 to 1.41. |
| 269 | |
| 270 | A new module, L<Sub::Util>, has been added, containing functions related to |
| 271 | CODE refs, including C<subname> (inspired by Sub::Identity) and C<set_subname> |
| 272 | (copied and renamed from Sub::Name). |
| 273 | |
| 274 | The use of C<GetMagic> in C<List::Util::reduce()> has also been fixed. |
| 275 | L<[cpan #63211]|https://rt.cpan.org/Ticket/Display.html?id=63211> |
| 276 | |
| 277 | =item * |
| 278 | |
| 279 | L<Term::ReadLine> has been upgraded from version 1.14 to 1.15. |
| 280 | |
| 281 | Faster checks are now made first in some if-statements. |
| 282 | |
| 283 | =item * |
| 284 | |
| 285 | L<Test::Harness> has been upgraded from version 3.32 to 3.33. |
| 286 | |
| 287 | Various documentation fixes. |
| 288 | |
| 289 | =item * |
| 290 | |
| 291 | L<Test::Simple> has been upgraded from version 1.001003 to 1.001006. |
| 292 | |
| 293 | Various documentation fixes. |
| 294 | |
| 295 | =item * |
| 296 | |
| 297 | L<threads> has been upgraded from version 1.95 to 1.96. |
| 298 | |
| 299 | No changes to installed files other than version bumps. |
| 300 | |
| 301 | =item * |
| 302 | |
| 303 | L<Time::Piece> has been upgraded from version 1.27 to 1.29. |
| 304 | |
| 305 | When pretty printing negative Time::Seconds, the "minus" is no longer lost. |
| 306 | |
| 307 | =item * |
| 308 | |
| 309 | L<version> has been upgraded from version 0.9908 to 0.9909. |
| 310 | |
| 311 | Numerous changes. See the F<Changes> file in the CPAN distribution for |
| 312 | details. |
| 313 | |
| 314 | =back |
| 315 | |
| 316 | =head1 Documentation |
| 317 | |
| 318 | =head2 Changes to Existing Documentation |
| 319 | |
| 320 | =head3 L<perlfunc> |
| 321 | |
| 322 | =over 4 |
| 323 | |
| 324 | =item * |
| 325 | |
| 326 | Calling C<delete> or C<exists> on array values is now described as "strongly |
| 327 | discouraged" rather than "deprecated". |
| 328 | |
| 329 | =back |
| 330 | |
| 331 | =head3 L<perlpolicy> |
| 332 | |
| 333 | =over 4 |
| 334 | |
| 335 | =item * |
| 336 | |
| 337 | The conditions for marking an experimental feature as non-experimental are now |
| 338 | set out. |
| 339 | |
| 340 | =back |
| 341 | |
| 342 | =head3 L<perlrecharclass> |
| 343 | |
| 344 | =over 4 |
| 345 | |
| 346 | =item * |
| 347 | |
| 348 | The documentation of Bracketed Character Classes has been expanded to cover the |
| 349 | improvements in C<qr/[\N{named sequence}]/> (see under L</Selected Bug Fixes>). |
| 350 | |
| 351 | =back |
| 352 | |
| 353 | =head3 L<perlsyn> |
| 354 | |
| 355 | =over 4 |
| 356 | |
| 357 | =item * |
| 358 | |
| 359 | An ambiguity in the documentation of the Ellipsis statement has been corrected. |
| 360 | L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661> |
| 361 | |
| 362 | =back |
| 363 | |
| 364 | =head3 L<perlxs> |
| 365 | |
| 366 | =over 4 |
| 367 | |
| 368 | =item * |
| 369 | |
| 370 | Added a discussion of locale issues in XS code. |
| 371 | |
| 372 | =back |
| 373 | |
| 374 | =head1 Diagnostics |
| 375 | |
| 376 | The following additions or changes have been made to diagnostic output, |
| 377 | including warnings and fatal error messages. For the complete list of |
| 378 | diagnostic messages, see L<perldiag>. |
| 379 | |
| 380 | =head2 New Diagnostics |
| 381 | |
| 382 | =head3 New Warnings |
| 383 | |
| 384 | =over 4 |
| 385 | |
| 386 | =item * |
| 387 | |
| 388 | L<Character in 'C' format overflow in pack|perldiag/"Character in 'C' format overflow in pack"> |
| 389 | |
| 390 | (W pack) You tried converting an infinity or not-a-number to an unsigned |
| 391 | character, which makes no sense. Perl behaved as if you tried to pack 0xFF. |
| 392 | |
| 393 | =item * |
| 394 | |
| 395 | L<Character in 'c' format overflow in pack|perldiag/"Character in 'c' format overflow in pack"> |
| 396 | |
| 397 | (W pack) You tried converting an infinity or not-a-number to a signed |
| 398 | character, which makes no sense. Perl behaved as if you tried to pack 0xFF. |
| 399 | |
| 400 | =item * |
| 401 | |
| 402 | L<Invalid number (%f) in chr|perldiag/"Invalid number (%f) in chr"> |
| 403 | |
| 404 | (W utf8) You passed an invalid number (like an infinity or not-a-number) to |
| 405 | C<chr>. Those are not valid character numbers, so it returned the Unicode |
| 406 | replacement character (U+FFFD). |
| 407 | |
| 408 | =back |
| 409 | |
| 410 | =head2 Changes to Existing Diagnostics |
| 411 | |
| 412 | =over 4 |
| 413 | |
| 414 | =item * |
| 415 | |
| 416 | L<Global symbol "%s" requires explicit package name|perldiag/"Global symbol "%s" requires explicit package name (did you forget to declare "my %s"?)"> |
| 417 | |
| 418 | This message has had '(did you forget to declare "my %s"?)' appended to it, to |
| 419 | make it more helpful to new Perl programmers. |
| 420 | L<[perl #121638]|https://rt.perl.org/Ticket/Display.html?id=121638> |
| 421 | |
| 422 | =item * |
| 423 | |
| 424 | L<\N{} in character class restricted to one character in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"\N{} in inverted character class or as a range end-point is restricted to one character in regex; marked by S<<-- HERE> in m/%s/"> |
| 425 | |
| 426 | This message has had 'character class' changed to 'inverted character class or |
| 427 | as a range end-point is' to reflect improvements in C<qr/[\N{named sequence}]/> |
| 428 | (see under L</Selected Bug Fixes>). |
| 429 | |
| 430 | =item * |
| 431 | |
| 432 | L<panic: frexp|perldiag/"panic: frexp: %f"> |
| 433 | |
| 434 | This message has had ': %f' appended to it, to show what the offending floating |
| 435 | point number is. |
| 436 | |
| 437 | =back |
| 438 | |
| 439 | =head2 Diagnostic Removals |
| 440 | |
| 441 | =over 4 |
| 442 | |
| 443 | =item * |
| 444 | |
| 445 | "Constant is not a FOO reference" |
| 446 | |
| 447 | Compile-time checking of constant dereferencing (e.g., C<< my_constant->() >>) |
| 448 | has been removed, since it was not taking overloading into account. |
| 449 | L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> |
| 450 | L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607> |
| 451 | |
| 452 | =item * |
| 453 | |
| 454 | "Ambiguous use of -foo resolved as -&foo()" |
| 455 | |
| 456 | There is actually no ambiguity here, and this impedes the use of negated |
| 457 | constants; e.g., C<-Inf>. |
| 458 | |
| 459 | =back |
| 460 | |
| 461 | =head1 Configuration and Compilation |
| 462 | |
| 463 | =over 4 |
| 464 | |
| 465 | =item * |
| 466 | |
| 467 | For long doubles (to get more precision and range for floating point numbers) |
| 468 | one can now use the GCC quadmath library which implements the quadruple |
| 469 | precision floating point numbers in x86 and ia64 platforms. See F<INSTALL> for |
| 470 | details. |
| 471 | |
| 472 | =back |
| 473 | |
| 474 | =head1 Testing |
| 475 | |
| 476 | =over 4 |
| 477 | |
| 478 | =item * |
| 479 | |
| 480 | A new test script, F<op/infnan.t>, has been added to test if Inf and NaN are |
| 481 | working correctly. See L</Infinity and NaN (not-a-number) handling improved>. |
| 482 | |
| 483 | =item * |
| 484 | |
| 485 | A new test script, F<re/rt122747.t>, has been added to test that the fix for |
| 486 | L<perl #122747|https://rt.perl.org/Ticket/Display.html?id=122747> is working. |
| 487 | |
| 488 | =back |
| 489 | |
| 490 | =head1 Internal Changes |
| 491 | |
| 492 | =over 4 |
| 493 | |
| 494 | =item * |
| 495 | |
| 496 | C<save_re_context> no longer does anything and has been moved to F<mathoms.c>. |
| 497 | |
| 498 | =item * |
| 499 | |
| 500 | C<cv_name> is a new API function that can be passed a CV or GV. It returns an |
| 501 | SV containing the name of the subroutine for use in diagnostics. |
| 502 | L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> |
| 503 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> |
| 504 | |
| 505 | =item * |
| 506 | |
| 507 | C<cv_set_call_checker_flags> is a new API function that works like |
| 508 | C<cv_set_call_checker>, except that it allows the caller to specify whether the |
| 509 | call checker requires a full GV for reporting the subroutine's name, or whether |
| 510 | it could be passed a CV instead. Whatever value is passed will be acceptable |
| 511 | to C<cv_name>. C<cv_set_call_checker> guarantees there will be a GV, but it |
| 512 | may have to create one on the fly, which is inefficient. |
| 513 | L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> |
| 514 | |
| 515 | =item * |
| 516 | |
| 517 | C<CvGV> (which is not part of the API) is now a more complex macro, which may |
| 518 | call a function and reify a GV. For those cases where is has been used as a |
| 519 | boolean, C<CvHASGV> has been added, which will return true for CVs that |
| 520 | notionally have GVs, but without reifying the GV. C<CvGV> also returns a GV |
| 521 | now for lexical subs. |
| 522 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> |
| 523 | |
| 524 | =item * |
| 525 | |
| 526 | Added L<perlapi/sync_locale>. Changing the program's locale should be avoided |
| 527 | by XS code. Nevertheless, certain non-Perl libraries called from XS, such as |
| 528 | C<Gtk> do so. When this happens, Perl needs to be told that the locale has |
| 529 | changed. Use this function to do so, before returning to Perl. |
| 530 | |
| 531 | =item * |
| 532 | |
| 533 | The defines and labels for the flags in the C<op_private> field of OPs are now |
| 534 | auto-generated from data in F<regen/op_private>. The noticeable effect of this |
| 535 | is that some of the flag output of C<Concise> might differ slightly, and the |
| 536 | flag output of C<perl -Dx> may differ considerably (they both use the same set |
| 537 | of labels now). Also in debugging builds, there is a new assert in |
| 538 | C<op_free()> that checks that the op doesn't have any unrecognized flags set in |
| 539 | C<op_private>. |
| 540 | |
| 541 | =back |
| 542 | |
| 543 | =head1 Selected Bug Fixes |
| 544 | |
| 545 | =over 4 |
| 546 | |
| 547 | =item * |
| 548 | |
| 549 | Constant dereferencing now works correctly for typeglob constants. Previously |
| 550 | the glob was stringified and its name looked up. Now the glob itself is used. |
| 551 | L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> |
| 552 | |
| 553 | =item * |
| 554 | |
| 555 | When parsing a funny character ($ @ % &) followed by braces, the parser no |
| 556 | longer tries to guess whether it is a block or a hash constructor (causing a |
| 557 | syntax error when it guesses the latter), since it can only be a block. |
| 558 | |
| 559 | =item * |
| 560 | |
| 561 | C<undef $reference> now frees the referent immediately, instead of hanging on |
| 562 | to it until the next statement. |
| 563 | L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556> |
| 564 | |
| 565 | =item * |
| 566 | |
| 567 | Various cases where the name of a sub is used (autoload, overloading, error |
| 568 | messages) used to crash for lexical subs, but have been fixed. |
| 569 | |
| 570 | =item * |
| 571 | |
| 572 | Bareword lookup now tries to avoid vivifying packages if it turns out the |
| 573 | bareword is not going to be a subroutine name. |
| 574 | |
| 575 | =item * |
| 576 | |
| 577 | Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer deletes |
| 578 | any subroutine named C<__ANON__> in the current package. Not only was |
| 579 | C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug goes |
| 580 | back to Perl 5.8.0. |
| 581 | |
| 582 | =item * |
| 583 | |
| 584 | Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out constants |
| 585 | of the same name declared by C<use constant>. This bug was introduced in Perl |
| 586 | 5.10.0. |
| 587 | |
| 588 | =item * |
| 589 | |
| 590 | Under some conditions a warning raised in compilation of regular expression |
| 591 | patterns could be displayed multiple times. This is now fixed. |
| 592 | |
| 593 | =item * |
| 594 | |
| 595 | C<qr/[\N{named sequence}]/> now works properly in many instances. Some names |
| 596 | known to C<\N{...}> refer to a sequence of multiple characters, instead of the |
| 597 | usual single character. Bracketed character classes generally only match |
| 598 | single characters, but now special handling has been added so that they can |
| 599 | match named sequences, but not if the class is inverted or the sequence is |
| 600 | specified as the beginning or end of a range. In these cases, the only |
| 601 | behavior change from before is a slight rewording of the fatal error message |
| 602 | given when this class is part of a C<?[...])> construct. When the C<[...]> |
| 603 | stands alone, the same non-fatal warning as before is raised, and only the |
| 604 | first character in the sequence is used, again just as before. |
| 605 | |
| 606 | =item * |
| 607 | |
| 608 | Tainted constants evaluated at compile time no longer cause unrelated |
| 609 | statements to become tainted. |
| 610 | L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669> |
| 611 | |
| 612 | =item * |
| 613 | |
| 614 | C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0", was |
| 615 | not giving the handle the right reference count, so a double free could happen. |
| 616 | |
| 617 | =item * |
| 618 | |
| 619 | When deciding that a bareword was a method name, the parser would get confused |
| 620 | if an "our" sub with the same name existed, and look up the method in the |
| 621 | package of the "our" sub, instead of the package of the invocant. |
| 622 | |
| 623 | =item * |
| 624 | |
| 625 | The parser no longer gets confused by C<\U=> within a double-quoted string. It |
| 626 | used to produce a syntax error, but now compiles it correctly. |
| 627 | L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368> |
| 628 | |
| 629 | =item * |
| 630 | |
| 631 | It has always been the intention for the C<-B> and C<-T> file test operators to |
| 632 | treat UTF-8 encoded files as text. (L<perlfunc|perlfunc/-X FILEHANDLE> has |
| 633 | been updated to say this.) Previously, it was possible for some files to be |
| 634 | considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The |
| 635 | operators now work on EBCDIC platforms as well. |
| 636 | |
| 637 | =item * |
| 638 | |
| 639 | Under some conditions warning messages raised during regular expression pattern |
| 640 | compilation were being output more than once. This has now been fixed. |
| 641 | |
| 642 | =item * |
| 643 | |
| 644 | A regression has been fixed that was introduced in Perl 5.20.0 (fixed in Perl |
| 645 | 5.20.1 as well as here) in which a UTF-8 encoded regular expression pattern |
| 646 | that contains a single ASCII lowercase letter does not match its uppercase |
| 647 | counterpart. |
| 648 | L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655> |
| 649 | |
| 650 | =item * |
| 651 | |
| 652 | Constant folding could incorrectly suppress warnings if lexical warnings (C<use |
| 653 | warnings> or C<no warnings>) were not in effect and C<$^W> were false at |
| 654 | compile time and true at run time. |
| 655 | |
| 656 | =item * |
| 657 | |
| 658 | Loading UTF8 tables during a regular expression match could cause assertion |
| 659 | failures under debugging builds if the previous match used the very same |
| 660 | regular expression. |
| 661 | L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747> |
| 662 | |
| 663 | =item * |
| 664 | |
| 665 | Thread cloning used to work incorrectly for lexical subs, possibly causing |
| 666 | crashes or double frees on exit. |
| 667 | |
| 668 | =item * |
| 669 | |
| 670 | Since Perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining an |
| 671 | anonymous subroutine could corrupt things internally, resulting in |
| 672 | L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data. This has been |
| 673 | fixed. |
| 674 | |
| 675 | =item * |
| 676 | |
| 677 | C<(caller $n)[3]> now reports names of lexical subs, instead of treating them |
| 678 | as "(unknown)". |
| 679 | |
| 680 | =item * |
| 681 | |
| 682 | C<sort subname LIST> now supports lexical subs for the comparison routine. |
| 683 | |
| 684 | =item * |
| 685 | |
| 686 | Aliasing (e.g., via C<*x = *y>) could confuse list assignments that mention the |
| 687 | two names for the same variable on either side, causing wrong values to be |
| 688 | assigned. |
| 689 | L<[perl #15667]|https://rt.perl.org/Ticket/Display.html?id=15667> |
| 690 | |
| 691 | =item * |
| 692 | |
| 693 | Long here-doc terminators could cause a bad read on short lines of input. This |
| 694 | has been fixed. It is doubtful that any crash could have occurred. This bug |
| 695 | goes back to when here-docs were introduced in Perl 3.000 twenty-five years |
| 696 | ago. |
| 697 | |
| 698 | =item * |
| 699 | |
| 700 | An optimization in C<split> to treat C<split/^/> like C<split/^/m> had the |
| 701 | unfortunate side-effect of also treating C<split/\A/> like C<split/^/m>, which |
| 702 | it should not. This has been fixed. (Note, however, that C<split/^x/> does |
| 703 | not behave like C<split/^x/m>, which is also considered to be a bug and will be |
| 704 | fixed in a future version.) |
| 705 | L<[perl #122761]|https://rt.perl.org/Ticket/Display.html?id=122761> |
| 706 | |
| 707 | =item * |
| 708 | |
| 709 | The little-known C<my Class $var> syntax (see L<fields> and L<attributes>) |
| 710 | could get confused in the scope of C<use utf8> if C<Class> were a constant |
| 711 | whose value contained Latin-1 characters. |
| 712 | |
| 713 | =back |
| 714 | |
| 715 | =head1 Acknowledgements |
| 716 | |
| 717 | Perl 5.21.4 represents approximately 4 weeks of development since Perl 5.21.3 |
| 718 | and contains approximately 29,000 lines of changes across 520 files from 30 |
| 719 | authors. |
| 720 | |
| 721 | Excluding auto-generated files, documentation and release tools, there were |
| 722 | approximately 15,000 lines of changes to 390 .pm, .t, .c and .h files. |
| 723 | |
| 724 | Perl continues to flourish into its third decade thanks to a vibrant community |
| 725 | of users and developers. The following people are known to have contributed |
| 726 | the improvements that became Perl 5.21.4: |
| 727 | |
| 728 | Alberto Simões, Alexandre (Midnite) Jousset, Andy Dougherty, Anthony Heading, |
| 729 | Brian Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David |
| 730 | Mitchell, Doug Bell, Father Chrysostomos, George Greer, H.Merijn Brand, James E |
| 731 | Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Karen Etheridge, Karl Williamson, |
| 732 | Olivier Mengué, Peter Martini, Reini Urban, Ricardo Signes, Steffen Müller, |
| 733 | Steve Hay, Sullivan Beck, syber, Tadeusz Sośnierz, Tony Cook, Yves Orton, |
| 734 | Ævar Arnfjörð Bjarmason. |
| 735 | |
| 736 | The list above is almost certainly incomplete as it is automatically generated |
| 737 | from version control history. In particular, it does not include the names of |
| 738 | the (very much appreciated) contributors who reported issues to the Perl bug |
| 739 | tracker. |
| 740 | |
| 741 | Many of the changes included in this version originated in the CPAN modules |
| 742 | included in Perl's core. We're grateful to the entire CPAN community for |
| 743 | helping Perl to flourish. |
| 744 | |
| 745 | For a more complete list of all of Perl's historical contributors, please see |
| 746 | the F<AUTHORS> file in the Perl source distribution. |
| 747 | |
| 748 | =head1 Reporting Bugs |
| 749 | |
| 750 | If you find what you think is a bug, you might check the articles recently |
| 751 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at |
| 752 | https://rt.perl.org/ . There may also be information at |
| 753 | http://www.perl.org/ , the Perl Home Page. |
| 754 | |
| 755 | If you believe you have an unreported bug, please run the L<perlbug> program |
| 756 | included with your release. Be sure to trim your bug down to a tiny but |
| 757 | sufficient test case. Your bug report, along with the output of C<perl -V>, |
| 758 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. |
| 759 | |
| 760 | If the bug you are reporting has security implications, which make it |
| 761 | inappropriate to send to a publicly archived mailing list, then please send it |
| 762 | to perl5-security-report@perl.org. This points to a closed subscription |
| 763 | unarchived mailing list, which includes all the core committers, who will be |
| 764 | able to help assess the impact of issues, figure out a resolution, and help |
| 765 | co-ordinate the release of patches to mitigate or fix the problem across all |
| 766 | platforms on which Perl is supported. Please only use this address for |
| 767 | security issues in the Perl core, not for modules independently distributed on |
| 768 | CPAN. |
| 769 | |
| 770 | =head1 SEE ALSO |
| 771 | |
| 772 | The F<Changes> file for an explanation of how to view exhaustive details on |
| 773 | what changed. |
| 774 | |
| 775 | The F<INSTALL> file for how to build Perl. |
| 776 | |
| 777 | The F<README> file for general stuff. |
| 778 | |
| 779 | The F<Artistic> and F<Copying> files for copyright information. |
| 780 | |
| 781 | =cut |