| 1 | =encoding utf8 |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
| 5 | perl5136delta - what is new for perl v5.13.6 |
| 6 | |
| 7 | =head1 DESCRIPTION |
| 8 | |
| 9 | This document describes differences between the 5.13.5 release and |
| 10 | the 5.13.6 release. |
| 11 | |
| 12 | If you are upgrading from an earlier release such as 5.13.4, first read |
| 13 | L<perl5135delta>, which describes differences between 5.13.4 and |
| 14 | 5.13.5. |
| 15 | |
| 16 | =head1 Core Enhancements |
| 17 | |
| 18 | =head2 C<(?^...)> regex construct added to signify default modifiers |
| 19 | |
| 20 | A caret (also called a "circumflex accent") C<"^"> immediately following |
| 21 | a C<"(?"> in a regular expression now means that the subexpression is to |
| 22 | not inherit the surrounding modifiers such as C</i>, but to revert to the |
| 23 | Perl defaults. Any modifiers following the caret override the defaults. |
| 24 | |
| 25 | The stringification of regular expressions now uses this |
| 26 | notation. E.g., before, C<qr/hlagh/i> would be stringified as |
| 27 | C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>. |
| 28 | |
| 29 | The main purpose of this is to allow tests that rely on the |
| 30 | stringification to not have to change when new modifiers are added. |
| 31 | See L<perlre/Extended Patterns>. |
| 32 | |
| 33 | =head2 C<"d">, C<"l">, and C<"u"> regex modifiers added |
| 34 | |
| 35 | These modifiers are currently only available within a C<(?...)> construct. |
| 36 | |
| 37 | The C<"l"> modifier says to compile the regular expression as if it were |
| 38 | in the scope of C<use locale>, even if it is not. |
| 39 | |
| 40 | The C<"u"> modifier says to compile the regular expression as if it were |
| 41 | in the scope of a C<use feature "unicode_strings"> pragma. |
| 42 | |
| 43 | The C<"d"> modifier is used to override any C<use locale> and |
| 44 | C<use feature "unicode_strings"> pragmas that are in effect at the time |
| 45 | of compiling the regular expression. |
| 46 | |
| 47 | See just below and L<perlre/(?dlupimsx-imsx)>. |
| 48 | |
| 49 | =head2 C<use feature "unicode_strings"> now applies to some regex matching |
| 50 | |
| 51 | Another chunk of the L<perlunicode/The "Unicode Bug"> is fixed in this |
| 52 | release. Now, regular expressions compiled within the scope of the |
| 53 | "unicode_strings" feature will match the same whether or not the target |
| 54 | string is encoded in utf8, with regard to C<\s>, C<\w>, C<\b>, and their |
| 55 | complements. Work is underway to add the C<[[:posix:]]> character |
| 56 | classes and case sensitive matching to the control of this feature, but |
| 57 | was not complete in time for this dot release. |
| 58 | |
| 59 | =head2 C<\N{...}> now handles Unicode named character sequences |
| 60 | |
| 61 | Unicode has a number of named character sequences, in which particular sequences |
| 62 | of code points are given names. C<\N{...}> now recognizes these. |
| 63 | See L<charnames>. |
| 64 | |
| 65 | =head2 New function C<charnames::string_vianame()> |
| 66 | |
| 67 | This function is a run-time version of C<\N{...}>, returning the string |
| 68 | of characters whose Unicode name is its parameter. It can handle |
| 69 | Unicode named character sequences, whereas the pre-existing |
| 70 | C<charnames::vianame()> cannot, as the latter returns a single code |
| 71 | point. |
| 72 | See L<charnames>. |
| 73 | |
| 74 | =head2 Reentrant regular expression engine |
| 75 | |
| 76 | It is now safe to use regular expressions within C<(?{...})> and |
| 77 | C<(??{...})> code blocks inside regular expressions. |
| 78 | |
| 79 | These block are still experimental, however, and still have problems with |
| 80 | lexical (C<my>) variables, lexical pragmata and abnormal exiting. |
| 81 | |
| 82 | =head2 Custom per-subroutine check hooks |
| 83 | |
| 84 | XS code in an extension module can now annotate a subroutine (whether |
| 85 | implemented in XS or in Perl) so that nominated XS code will be called |
| 86 | at compile time (specifically as part of op checking) to change the op |
| 87 | tree of that subroutine. The compile-time check function (supplied by |
| 88 | the extension module) can implement argument processing that can't be |
| 89 | expressed as a prototype, generate customised compile-time warnings, |
| 90 | perform constant folding for a pure function, inline a subroutine |
| 91 | consisting of sufficiently simple ops, replace the whole call with a |
| 92 | custom op, and so on. This was previously all possible by hooking the |
| 93 | C<entersub> op checker, but the new mechanism makes it easy to tie the |
| 94 | hook to a specific subroutine. See L<perlapi/cv_set_call_checker>. |
| 95 | |
| 96 | To help in writing custom check hooks, several subtasks within standard |
| 97 | C<entersub> op checking have been separated out and exposed in the API. |
| 98 | |
| 99 | =head2 Return value of C<delete $+{...}> |
| 100 | |
| 101 | Custom regular expression engines can now determine the return value of |
| 102 | C<delete> on an entry of C<%+> or C<%->. |
| 103 | |
| 104 | =head2 C<keys>, C<values> work on arrays |
| 105 | |
| 106 | You can now use the C<keys>, C<values>, C<each> builtin functions on arrays |
| 107 | (previously you could only use them on hashes). See L<perlfunc> for details. |
| 108 | This is actually a change introduced in perl 5.12.0, but it was missed from |
| 109 | that release's perldelta. |
| 110 | |
| 111 | =head1 Incompatible Changes |
| 112 | |
| 113 | =head2 Stringification of regexes has changed |
| 114 | |
| 115 | Default regular expression modifiers are now notated by using |
| 116 | C<(?^...)>. Code relying on the old stringification will fail. The |
| 117 | purpose of this is so that when new modifiers are added, such code will |
| 118 | not have to change (after this one time), as the stringification will |
| 119 | automatically incorporate the new modifiers. |
| 120 | |
| 121 | Code that needs to work properly with both old- and new-style regexes |
| 122 | can avoid the whole issue by using (for Perls since 5.9.5): |
| 123 | |
| 124 | use re qw(regexp_pattern); |
| 125 | my ($pat, $mods) = regexp_pattern($re_ref); |
| 126 | |
| 127 | where C<$re_ref> is a reference to a compiled regular expression. Upon |
| 128 | return, C<$mods> will be a string containing all the non-default |
| 129 | modifiers used when the regular expression was compiled, and C<$pattern> |
| 130 | the actual pattern. |
| 131 | |
| 132 | If the actual stringification is important, or older Perls need to be |
| 133 | supported, you can use something like the following: |
| 134 | |
| 135 | # Accept both old and new-style stringification |
| 136 | my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; |
| 137 | |
| 138 | And then use C<$modifiers> instead of C<-xism>. |
| 139 | |
| 140 | =head2 Regular expressions retain their localeness when interpolated |
| 141 | |
| 142 | Regular expressions compiled under C<"use locale"> now retain this when |
| 143 | interpolated into a new regular expression compiled outside a |
| 144 | C<"use locale">, and vice-versa. |
| 145 | |
| 146 | Previously, a regular expression interpolated into another one inherited |
| 147 | the localeness of the surrounding one, losing whatever state it |
| 148 | originally had. This is considered a bug fix, but may trip up code that |
| 149 | has come to rely on the incorrect behavior. |
| 150 | |
| 151 | =head2 Directory handles not copied to threads |
| 152 | |
| 153 | On systems that do not have a C<fchdir> function, newly-created threads no |
| 154 | longer inherit directory handles from their parent threads. Such programs |
| 155 | would probably have crashed anyway |
| 156 | L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>. |
| 157 | |
| 158 | =head2 Negation treats strings differently from before |
| 159 | |
| 160 | The unary negation operator C<-> now treats strings that look like numbers |
| 161 | as numbers |
| 162 | L<[perl #57706]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=57706>. |
| 163 | |
| 164 | =head2 Negative zero |
| 165 | |
| 166 | Negative zero (-0.0), when converted to a string, now becomes "0" on all |
| 167 | platforms. It used to become "-0" on some, but "0" on others. |
| 168 | |
| 169 | If you still need to determine whether a zero is negative, use |
| 170 | C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN. |
| 171 | |
| 172 | =head1 Performance Enhancements |
| 173 | |
| 174 | =over 4 |
| 175 | |
| 176 | =item * |
| 177 | |
| 178 | The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl |
| 179 | core. It has now been moved to an XS module, to reduce the overhead for |
| 180 | programs that do not use C<%+> or C<%->. |
| 181 | |
| 182 | =item * |
| 183 | |
| 184 | Eliminate C<PL_*> accessor functions under ithreads. |
| 185 | |
| 186 | When C<MULTIPLICITY> was first developed, and interpreter state moved into an |
| 187 | interpreter struct, thread and interpreter local C<PL_*> variables were defined |
| 188 | as macros that called accessor functions, returning the address of the value, |
| 189 | outside of the perl core. The intent was to allow members within the interpreter |
| 190 | struct to change size without breaking binary compatibility, so that bug fixes |
| 191 | could be merged to a maintenance branch that necessitated such a size change. |
| 192 | |
| 193 | However, some non-core code defines C<PERL_CORE>, sometimes intentionally to |
| 194 | bypass this mechanism for speed reasons, sometimes for other reasons but with |
| 195 | the inadvertent side effect of bypassing this mechanism. As some of this code is |
| 196 | widespread in production use, the result is that the core B<can't> change the |
| 197 | size of members of the interpreter struct, as it will break such modules |
| 198 | compiled against a previous release on that maintenance branch. The upshot is |
| 199 | that this mechanism is redundant, and well-behaved code is penalised by |
| 200 | it. Hence it can and should be removed. |
| 201 | |
| 202 | =back |
| 203 | |
| 204 | =head1 Modules and Pragmata |
| 205 | |
| 206 | =head2 Updated Modules and Pragmata |
| 207 | |
| 208 | =over 4 |
| 209 | |
| 210 | =item * |
| 211 | |
| 212 | C<Archive::Extract> has been upgraded from version 0.42 to 0.44 |
| 213 | |
| 214 | =item * |
| 215 | |
| 216 | C<Carp> has been upgraded from version 1.18 to 1.19. |
| 217 | |
| 218 | It no longer autovivifies the C<*CORE::GLOBAL::caller> glob, something it |
| 219 | started doing in 1.18, which was released with perl 5.13.4 |
| 220 | L<[perl #78082]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78082> |
| 221 | |
| 222 | =item * |
| 223 | |
| 224 | C<Compress::Raw::Bzip2> has been upgraded from version 2.030 to 2.031 |
| 225 | |
| 226 | Updated to use bzip2 1.0.6 |
| 227 | |
| 228 | =item * |
| 229 | |
| 230 | C<CPAN> has been upgraded from version 1.94_57 to 1.94_61 |
| 231 | |
| 232 | =item * |
| 233 | |
| 234 | C<Data::Dumper> has been upgraded from version 2.128 to 2.129. |
| 235 | |
| 236 | C<Dumpxs> no longer crashes with globs returned by C<*$io_ref> |
| 237 | L<[perl #72332]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72332>. |
| 238 | |
| 239 | =item * |
| 240 | |
| 241 | C<Digest::MD5> has been upgraded from version 2.40 to 2.51. |
| 242 | |
| 243 | It is now safe to use this module in combination with threads. |
| 244 | |
| 245 | =item * |
| 246 | |
| 247 | C<File::DosGlob> has been upgraded from version 1.02 to 1.03. |
| 248 | |
| 249 | It allows patterns containing literal parentheses (they no longer need to |
| 250 | be escaped). On Windows, it no longer adds an extra F<./> to the file names |
| 251 | returned when the pattern is a relative glob with a drive specification, |
| 252 | like F<c:*.pl> |
| 253 | L<[perl #71712]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71712>. |
| 254 | |
| 255 | =item * |
| 256 | |
| 257 | C<File::Find> has been upgraded from version 1.17 to 1.18. |
| 258 | |
| 259 | It improves handling of backslashes on Windows, so that paths such as |
| 260 | F<c:\dir\/file> are no longer generated |
| 261 | L<[perl #71710]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>. |
| 262 | |
| 263 | =item * |
| 264 | |
| 265 | C<if> has been upgraded from version 0.05 to 0.06 |
| 266 | |
| 267 | =item * |
| 268 | |
| 269 | C<IPC::Cmd> has been upgraded from version 0.60 to 0.64 |
| 270 | |
| 271 | =item * |
| 272 | |
| 273 | C<IPC::Open3> has been upgraded from version 1.06 to 1.07. |
| 274 | |
| 275 | The internal C<xclose> routine now knows how to handle file descriptors, as |
| 276 | documented, so duplicating STDIN in a child process using its file |
| 277 | descriptor now works |
| 278 | L<[perl #76474]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>. |
| 279 | |
| 280 | =item * |
| 281 | |
| 282 | C<Locale::Codes> has been upgraded from version 3.13 to 3.14. |
| 283 | |
| 284 | =item * |
| 285 | |
| 286 | C<Locale::Maketext> has been upgraded from version 1.15 to 1.16. |
| 287 | |
| 288 | It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when |
| 289 | working with tainted values |
| 290 | (L<CPAN RT #40727|https://rt.cpan.org/Public/Bug/Display.html?id=40727>). |
| 291 | |
| 292 | C<< ->maketext >> calls will now backup and restore C<$@> so that error |
| 293 | messages are not suppressed |
| 294 | (L<CPAN RT #34182|https://rt.cpan.org/Public/Bug/Display.html?id=34182>). |
| 295 | |
| 296 | =item * |
| 297 | |
| 298 | C<Math::BigInt> has been upgraded from version 1.95 to 1.97. |
| 299 | |
| 300 | This prevents C<sqrt($int)> from crashing under C<use bigrat;> |
| 301 | L<[perl #73534]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73534>. |
| 302 | |
| 303 | =item * |
| 304 | |
| 305 | C<NEXT> has been upgraded from version 0.64 to 0.65. |
| 306 | |
| 307 | =item * |
| 308 | |
| 309 | C<overload> has been upgraded from version 1.10 to 1.11. |
| 310 | |
| 311 | C<overload::Method> can now handle subroutines that are themselves blessed |
| 312 | into overloaded classes |
| 313 | L<[perl #71998]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71998>. |
| 314 | |
| 315 | =item * |
| 316 | |
| 317 | C<PathTools> has been upgraded from version 3.31_01 to 3.34. |
| 318 | |
| 319 | =item * |
| 320 | |
| 321 | C<podlators> has been upgraded from version 2.3.1 to 2.4.0 |
| 322 | |
| 323 | =item * |
| 324 | |
| 325 | C<sigtrap> has been upgraded from version 1.04 to 1.05. |
| 326 | |
| 327 | It no longer tries to modify read-only arguments when generating a |
| 328 | backtrace |
| 329 | L<[perl #72340]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72340>. |
| 330 | |
| 331 | =item * |
| 332 | |
| 333 | C<threads> has been upgraded from version 1.77_03 to 1.81_01. |
| 334 | |
| 335 | =item * |
| 336 | |
| 337 | C<threads::shared> has been upgrade from version 1.33_03 to 1.34 |
| 338 | |
| 339 | =item * |
| 340 | |
| 341 | C<Unicode::Collate> has been upgraded from version 0.59 to 0.63 |
| 342 | |
| 343 | U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om, |
| 344 | tn, vi, hr, ig, ru, sq, se, sr, to and uk |
| 345 | |
| 346 | =item * |
| 347 | |
| 348 | C<Unicode::Normalize> has been upgraded from version 1.06 to 1.07 |
| 349 | |
| 350 | =item * |
| 351 | |
| 352 | C<B::Deparse> has been upgraded from version 0.98 to 0.99 |
| 353 | |
| 354 | B::Deparse now properly handles the code that applies a conditional |
| 355 | pattern match against implicit C<$_> as it was fixed in |
| 356 | L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>. |
| 357 | |
| 358 | =item * |
| 359 | |
| 360 | C<GDBM_File> has been upgraded from version 1.10 to 1.11 |
| 361 | |
| 362 | =back |
| 363 | |
| 364 | =head1 Documentation |
| 365 | |
| 366 | =head2 Changes to Existing Documentation |
| 367 | |
| 368 | =head3 L<perlapi> |
| 369 | |
| 370 | =over 4 |
| 371 | |
| 372 | =item * |
| 373 | |
| 374 | The documentation for the C<SvTRUE> macro was simply wrong in stating that |
| 375 | get-magic is not processed. It has been corrected. |
| 376 | |
| 377 | =back |
| 378 | |
| 379 | =head1 Diagnostics |
| 380 | |
| 381 | The following additions or changes have been made to diagnostic output, |
| 382 | including warnings and fatal error messages. For the complete list of |
| 383 | diagnostic messages, see L<perldiag>. |
| 384 | |
| 385 | =head2 Changes to Existing Diagnostics |
| 386 | |
| 387 | =over 4 |
| 388 | |
| 389 | =item * |
| 390 | |
| 391 | The 'Layer does not match this perl' error message has been replaced with |
| 392 | these more helpful messages: |
| 393 | |
| 394 | =over 4 |
| 395 | |
| 396 | =item * |
| 397 | |
| 398 | PerlIO layer function table size (%d) does not match size expected by this |
| 399 | perl (%d) |
| 400 | |
| 401 | =item * |
| 402 | |
| 403 | PerlIO layer instance size (%d) does not match size expected by this perl |
| 404 | (%d) |
| 405 | |
| 406 | =back |
| 407 | |
| 408 | L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754> |
| 409 | |
| 410 | =back |
| 411 | |
| 412 | =head1 Testing |
| 413 | |
| 414 | =over 4 |
| 415 | |
| 416 | =item * |
| 417 | |
| 418 | The script F<t/op/threads-dirh.t> has been added, which tests interaction |
| 419 | of threads and directory handles. |
| 420 | |
| 421 | =back |
| 422 | |
| 423 | =head1 Platform Support |
| 424 | |
| 425 | =head2 Platform-Specific Notes |
| 426 | |
| 427 | =over 4 |
| 428 | |
| 429 | =item IRIX |
| 430 | |
| 431 | Conversion of strings to floating-point numbers is now more accurate on |
| 432 | IRIX systems |
| 433 | L<[perl #32380]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=32380>. |
| 434 | |
| 435 | =item Mac OS X |
| 436 | |
| 437 | Early versions of Mac OS X (Darwin) had buggy implementations of the |
| 438 | C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl |
| 439 | would pretend they did not exist. |
| 440 | |
| 441 | These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and |
| 442 | higher, as they have been fixed |
| 443 | L<[perl #72990]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72990>. |
| 444 | |
| 445 | =item OpenVOS |
| 446 | |
| 447 | perl now builds again with OpenVOS (formerly known as Stratus VOS) |
| 448 | L<[perl #78132]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78132>. |
| 449 | |
| 450 | =item VMS |
| 451 | |
| 452 | The shortening of symbols longer than 31 characters in the C sources is |
| 453 | now done by the compiler rather than by xsubpp (which could only do so |
| 454 | for generated symbols in XS code). |
| 455 | |
| 456 | =item Windows |
| 457 | |
| 458 | C<$Config{gccversion}> is now set correctly when perl is built using the |
| 459 | mingw64 compiler from L<http://mingw64.org> |
| 460 | L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754>. |
| 461 | |
| 462 | The build process proceeds more smoothly with mingw and dmake when |
| 463 | F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix. |
| 464 | |
| 465 | =back |
| 466 | |
| 467 | =head1 Internal Changes |
| 468 | |
| 469 | =over 4 |
| 470 | |
| 471 | =item * |
| 472 | |
| 473 | See L</Regular expressions retain their localeness when interpolated>, |
| 474 | above. |
| 475 | |
| 476 | =item * |
| 477 | |
| 478 | The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and |
| 479 | C<sv_collxfrm_flags> functions have been added. These are like their |
| 480 | non-_flags counterparts, but allow one to specify whether get-magic is |
| 481 | processed. |
| 482 | |
| 483 | The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have |
| 484 | been replaced with wrappers around the new functions. |
| 485 | |
| 486 | =item * |
| 487 | |
| 488 | A new C<sv_2bool_flags> function has been added. |
| 489 | |
| 490 | This is like C<sv_2bool>, but it lets the calling code decide whether |
| 491 | get-magic is handled. C<sv_2bool> is now a macro that calls the new |
| 492 | function. |
| 493 | |
| 494 | =item * |
| 495 | |
| 496 | A new macro, C<SvTRUE_nomg>, has been added. |
| 497 | |
| 498 | This is like C<SvTRUE>, except that it does not process magic. It uses the |
| 499 | new C<sv_2bool_flags> function. |
| 500 | |
| 501 | =item * |
| 502 | |
| 503 | C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the |
| 504 | source string) if the flags passed to it do not include SV_GMAGIC. So it |
| 505 | now matches the documentation. |
| 506 | |
| 507 | =item * |
| 508 | |
| 509 | A new interface has been added for custom check hooks on subroutines. See |
| 510 | L</Custom per-subroutine check hooks>, above. |
| 511 | |
| 512 | =item * |
| 513 | |
| 514 | List op building functions have been added to the |
| 515 | API. See L<op_append_elem|perlapi/op_append_elem>, |
| 516 | L<op_append_list|perlapi/op_append_list>, and |
| 517 | L<op_prepend_elem|perlapi/op_prepend_elem>. |
| 518 | |
| 519 | =item * |
| 520 | |
| 521 | The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that |
| 522 | constructs the execution-order op chain, has been added to the API. |
| 523 | |
| 524 | =item * |
| 525 | |
| 526 | Many functions ending with pvn now have equivalent pv/pvs/sv versions. |
| 527 | |
| 528 | =item * |
| 529 | |
| 530 | The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr> |
| 531 | functions have been added to the API. |
| 532 | |
| 533 | =item * |
| 534 | |
| 535 | The new API function C<parse_stmtseq()> parses a sequence of statements, up |
| 536 | to closing brace or EOF. |
| 537 | |
| 538 | =back |
| 539 | |
| 540 | =head1 Selected Bug Fixes |
| 541 | |
| 542 | =over 4 |
| 543 | |
| 544 | =item * |
| 545 | |
| 546 | A regular expression match in the right-hand side of a global substitution |
| 547 | (C<s///g>) that is in the same scope will no longer cause match variables |
| 548 | to have the wrong values on subsequent iterations. This can happen when an |
| 549 | array or hash subscript is interpolated in the right-hand side, as in |
| 550 | C<s|(.)|@a{ print($1), /./ }|g> |
| 551 | L<[perl #19078]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=19078>. |
| 552 | |
| 553 | =item * |
| 554 | |
| 555 | Constant-folding used to cause |
| 556 | |
| 557 | $text =~ ( 1 ? /phoo/ : /bear/) |
| 558 | |
| 559 | to turn into |
| 560 | |
| 561 | $text =~ /phoo/ |
| 562 | |
| 563 | at compile time. Now it correctly matches against C<$_> |
| 564 | L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>. |
| 565 | |
| 566 | =item * |
| 567 | |
| 568 | Parsing Perl code (either with string C<eval> or by loading modules) from |
| 569 | within a C<UNITCHECK> block no longer causes the interpreter to crash |
| 570 | L<[perl #70614]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=70614>. |
| 571 | |
| 572 | =item * |
| 573 | |
| 574 | When C<-d> is used on the shebang (C<#!>) line, the debugger now has access |
| 575 | to the lines of the main program. In the past, this sometimes worked and |
| 576 | sometimes did not, depending on what order things happened to be arranged |
| 577 | in memory |
| 578 | L<[perl #71806]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71806>. |
| 579 | |
| 580 | =item * |
| 581 | |
| 582 | The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH> |
| 583 | method of a tie) on its left-hand side just once, not twice |
| 584 | L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>. |
| 585 | |
| 586 | =item * |
| 587 | |
| 588 | String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and |
| 589 | C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic |
| 590 | (e.g., tie methods) twice on their operands |
| 591 | L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>. |
| 592 | |
| 593 | This bug was introduced in an earlier 5.13 release, and does not affect |
| 594 | perl 5.12. |
| 595 | |
| 596 | =item * |
| 597 | |
| 598 | When a tied (or other magic) variable is used as, or in, a regular |
| 599 | expression, it no longer has its C<FETCH> method called twice |
| 600 | L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>. |
| 601 | |
| 602 | This bug was introduced in an earlier 5.13 release, and does not affect |
| 603 | perl 5.12. |
| 604 | |
| 605 | =item * |
| 606 | |
| 607 | The C<-C> command line option can now be followed by other options |
| 608 | L<[perl #72434]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72434>. |
| 609 | |
| 610 | =item * |
| 611 | |
| 612 | Assigning a glob to a PVLV used to convert it to a plain string. Now it |
| 613 | works correctly, and a PVLV can hold a glob. This would happen when a |
| 614 | nonexistent hash or array element was passed to a subroutine: |
| 615 | |
| 616 | sub { $_[0] = *foo }->($hash{key}); |
| 617 | # $_[0] would have been the string "*main::foo" |
| 618 | |
| 619 | It also happened when a glob was assigned to, or returned from, an element |
| 620 | of a tied array or hash |
| 621 | L<[perl #36051]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=36051>. |
| 622 | |
| 623 | =item * |
| 624 | |
| 625 | Creating a new thread when directory handles were open used to cause a |
| 626 | crash, because the handles were not cloned, but simply passed to the new |
| 627 | thread, resulting in a double free. |
| 628 | |
| 629 | Now directory handles are cloned properly, on systems that have a C<fchdir> |
| 630 | function. On other systems, new threads simply do not inherit directory |
| 631 | handles from their parent threads |
| 632 | L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>. |
| 633 | |
| 634 | =item * |
| 635 | |
| 636 | The regular expression parser no longer hangs when parsing C<\18> and |
| 637 | C<\88>. |
| 638 | |
| 639 | This bug was introduced in version 5.13.5 and did not affect earlier |
| 640 | versions |
| 641 | L<[perl #78058]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78058>. |
| 642 | |
| 643 | =item * |
| 644 | |
| 645 | Subroutine redefinition works once more in the debugger |
| 646 | L<[perl #48332]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48332>. |
| 647 | |
| 648 | =item * |
| 649 | |
| 650 | The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments |
| 651 | L<[perl #20661]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=20661>. |
| 652 | |
| 653 | =item * |
| 654 | |
| 655 | Stringifying a scalar containing -0.0 no longer has the affect of turning |
| 656 | false into true |
| 657 | L<[perl #45133]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45133>. |
| 658 | |
| 659 | =item * |
| 660 | |
| 661 | Aliasing packages by assigning to globs or deleting packages by deleting |
| 662 | their containing stash elements used to have erratic effects on method |
| 663 | resolution, because the internal 'isa' caches were not reset. This has been |
| 664 | fixed. |
| 665 | |
| 666 | =item * |
| 667 | |
| 668 | C<sort> with a custom sort routine could crash if too many nested |
| 669 | subroutine calls occurred from within the sort routine |
| 670 | L<[perl #77930]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77930>. |
| 671 | |
| 672 | This bug was introduced in an earlier 5.13 release, and did not affect |
| 673 | perl 5.12. |
| 674 | |
| 675 | =item * |
| 676 | |
| 677 | The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when |
| 678 | there is a syntax error and no C<G_KEEPERR> flag, and never set it if the |
| 679 | C<G_KEEPERR> flag is present |
| 680 | L<[perl #3719]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=3719>. |
| 681 | |
| 682 | =item * |
| 683 | |
| 684 | Nested C<map> and C<grep> blocks no longer leak memory when processing |
| 685 | large lists |
| 686 | L<[perl #48004]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48004>. |
| 687 | |
| 688 | =item * |
| 689 | |
| 690 | Malformed C<version> objects no longer cause crashes |
| 691 | L<[perl #78286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78286>. |
| 692 | |
| 693 | =item * |
| 694 | |
| 695 | The interpreter no longer crashes when freeing deeply-nested arrays of |
| 696 | arrays. Hashes have not been fixed yet |
| 697 | L<[perl #44225]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=44225>. |
| 698 | |
| 699 | =item * |
| 700 | |
| 701 | The mechanism for freeing objects in globs used to leave dangling |
| 702 | pointers to freed SVs, meaning Perl users could see corrupted state |
| 703 | during destruction. |
| 704 | |
| 705 | Perl now only frees the affected slots of the GV, rather than freeing |
| 706 | the GV itself. This makes sure that there are no dangling refs or |
| 707 | corrupted state during destruction. |
| 708 | |
| 709 | =item * |
| 710 | |
| 711 | The typeglob C<*,>, which holds the scalar variable C<$,> (output field |
| 712 | separator), had the wrong reference count in child threads. |
| 713 | |
| 714 | =item * |
| 715 | |
| 716 | C<splice> now calls set-magic. This means that, for instance, changes made |
| 717 | by C<splice @ISA> are respected by method calls |
| 718 | L<[perl #78400]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78400>. |
| 719 | |
| 720 | =item * |
| 721 | |
| 722 | C<use v5.8> no longer leaks memory |
| 723 | L<[perl #78436]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78436>. |
| 724 | |
| 725 | =item * |
| 726 | |
| 727 | The XS multicall API no longer causes subroutines to lose reference counts |
| 728 | if called via the multicall interface from within those very subroutines. |
| 729 | This affects modules like List::Util. Calling one of its functions with an |
| 730 | active subroutine as the first argument could cause a crash |
| 731 | L<[perl #78070]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78070>. |
| 732 | |
| 733 | =back |
| 734 | |
| 735 | =head1 Errata |
| 736 | |
| 737 | =over 4 |
| 738 | |
| 739 | =item * |
| 740 | |
| 741 | Fixed a typo in L<perl5135delta> regarding array slices and smart matching |
| 742 | |
| 743 | =back |
| 744 | |
| 745 | =head1 Acknowledgements |
| 746 | |
| 747 | Perl 5.13.6 represents approximately one month of development since Perl |
| 748 | 5.13.5 and contains 67920 lines of changes across 566 files from 47 authors |
| 749 | and committers: |
| 750 | |
| 751 | A. Sinan Unur, Aaron Crane, Alex Davies, Ali Polatel, Allen Smith, Andrew Rodland, |
| 752 | Andy Dougherty, Ben Morrow, brian d foy, Casey West, Chip Salzenberg, Chris |
| 753 | 'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell, Eric Brine, |
| 754 | Father Chrysostomos, Florian Ragwitz, George Greer, gregor herrmann, Jan Dubois, |
| 755 | Jerry D. Hedden, Jesse Vincent, Joshua Pritikin, Karl Williamson, kmx, Michael |
| 756 | G Schwern, Mike Kelly, Nicholas Clark, Paul Green, Rafael Garcia-Suarez, Renee |
| 757 | Baecker, Ricardo Signes, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay, |
| 758 | Sullivan Beck, Tatsuhiko Miyagawa, Todd Rinaldo, Tony Cook, Tye McQueen, Vernon |
| 759 | Lyon, Walt Mankowski, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason. |
| 760 | |
| 761 | Many of the changes included in this version originated in the CPAN |
| 762 | modules included in Perl's core. We're grateful to the entire CPAN |
| 763 | community for helping Perl to flourish. |
| 764 | |
| 765 | =head1 Reporting Bugs |
| 766 | |
| 767 | If you find what you think is a bug, you might check the articles |
| 768 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
| 769 | bug database at http://rt.perl.org/perlbug/ . There may also be |
| 770 | information at http://www.perl.org/ , the Perl Home Page. |
| 771 | |
| 772 | If you believe you have an unreported bug, please run the B<perlbug> |
| 773 | program included with your release. Be sure to trim your bug down |
| 774 | to a tiny but sufficient test case. Your bug report, along with the |
| 775 | output of C<perl -V>, will be sent off to perlbug@perl.org to be |
| 776 | analysed by the Perl porting team. |
| 777 | |
| 778 | If the bug you are reporting has security implications, which make it |
| 779 | inappropriate to send to a publicly archived mailing list, then please send |
| 780 | it to perl5-security-report@perl.org. This points to a closed subscription |
| 781 | unarchived mailing list, which includes |
| 782 | all the core committers, who will be able |
| 783 | to help assess the impact of issues, figure out a resolution, and help |
| 784 | co-ordinate the release of patches to mitigate or fix the problem across all |
| 785 | platforms on which Perl is supported. Please only use this address for |
| 786 | security issues in the Perl core, not for modules independently |
| 787 | distributed on CPAN. |
| 788 | |
| 789 | =head1 SEE ALSO |
| 790 | |
| 791 | The F<Changes> file for an explanation of how to view exhaustive details |
| 792 | on what changed. |
| 793 | |
| 794 | The F<INSTALL> file for how to build Perl. |
| 795 | |
| 796 | The F<README> file for general stuff. |
| 797 | |
| 798 | The F<Artistic> and F<Copying> files for copyright information. |
| 799 | |
| 800 | =cut |