| 1 | =encoding utf8 |
| 2 | |
| 3 | =for comment |
| 4 | This has been completed up to 7be5bd17, except for: |
| 5 | bb789b09de07edfb74477eb1603949c96d60927d (Dave Mitchell) |
| 6 | |
| 7 | =head1 NAME |
| 8 | |
| 9 | [ this is a template for a new perldelta file. Any text flagged as |
| 10 | XXX needs to be processed before release. ] |
| 11 | |
| 12 | perldelta - what is new for perl v5.15.1 |
| 13 | |
| 14 | =head1 DESCRIPTION |
| 15 | |
| 16 | This document describes differences between the 5.15.1 release and |
| 17 | the 5.15.0 release. |
| 18 | |
| 19 | If you are upgrading from an earlier release such as 5.14.0, first read |
| 20 | L<perl5150delta>, which describes differences between 5.14.0 and |
| 21 | 5.15.0. |
| 22 | |
| 23 | =head1 Notice |
| 24 | |
| 25 | XXX Any important notices here |
| 26 | |
| 27 | =head1 Core Enhancements |
| 28 | |
| 29 | XXX New core language features go here. Summarise user-visible core language |
| 30 | enhancements. Particularly prominent performance optimisations could go |
| 31 | here, but most should go in the L</Performance Enhancements> section. |
| 32 | |
| 33 | [ List each enhancement as a =head2 entry ] |
| 34 | |
| 35 | =head2 C<splice()> doesn't warn when truncating |
| 36 | |
| 37 | You can now limit the size of an array using C<splice(@a,MAX_LEN)> without |
| 38 | worrying about warnings. |
| 39 | |
| 40 | =head2 The C<\$> prototype accepts any scalar lvalue |
| 41 | |
| 42 | The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue |
| 43 | argument. Previously they only accepted scalars beginning with C<$> and |
| 44 | hash and array elements. This change makes them consistent with the way |
| 45 | the built-in C<read> and C<recv> functions (among others) parse their |
| 46 | arguments. This means that one can override the built-in functions with |
| 47 | custom subroutines that parse their arguments the same way. |
| 48 | |
| 49 | =head2 You can now C<study> more than one string |
| 50 | |
| 51 | The restriction that you can only have one C<study> active at a time has been |
| 52 | removed. You can now usefully C<study> as many strings as you want (until you |
| 53 | exhaust memory). |
| 54 | |
| 55 | =head2 The Unicode C<Script_Extensions> property is now supported. |
| 56 | |
| 57 | New in Unicode 6.0, this is an improved C<Script> property. Details |
| 58 | are in L<perlunicode/Scripts>. |
| 59 | |
| 60 | =head2 DTrace probes for interpreter phase change |
| 61 | |
| 62 | The C<phase-change> probes will fire when the interpreter's phase |
| 63 | changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is |
| 64 | the new phase name; C<arg1> is the old one. This is useful mostly |
| 65 | for limiting your instrumentation to one or more of: compile time, |
| 66 | run time, destruct time. |
| 67 | |
| 68 | =head2 New Pad API |
| 69 | |
| 70 | Many new functions have been added to the API for manipulating lexical |
| 71 | pads. See L<perlapi/Pad Data Structures> for more information. |
| 72 | |
| 73 | =head1 Security |
| 74 | |
| 75 | XXX Any security-related notices go here. In particular, any security |
| 76 | vulnerabilities closed should be noted here rather than in the |
| 77 | L</Selected Bug Fixes> section. |
| 78 | |
| 79 | [ List each security issue as a =head2 entry ] |
| 80 | |
| 81 | =head1 Incompatible Changes |
| 82 | |
| 83 | XXX For a release on a stable branch, this section aspires to be: |
| 84 | |
| 85 | There are no changes intentionally incompatible with 5.XXX.XXX |
| 86 | If any exist, they are bugs and reports are welcome. |
| 87 | |
| 88 | [ List each incompatible change as a =head2 entry ] |
| 89 | |
| 90 | =head1 Deprecations |
| 91 | |
| 92 | XXX Any deprecated features, syntax, modules etc. should be listed here. |
| 93 | In particular, deprecated modules should be listed here even if they are |
| 94 | listed as an updated module in the L</Modules and Pragmata> section. |
| 95 | |
| 96 | [ List each deprecation as a =head2 entry ] |
| 97 | |
| 98 | =head1 Performance Enhancements |
| 99 | |
| 100 | XXX Changes which enhance performance without changing behaviour go here. There |
| 101 | may well be none in a stable release. |
| 102 | |
| 103 | [ List each enhancement as a =item entry ] |
| 104 | |
| 105 | =over 4 |
| 106 | |
| 107 | =item * |
| 108 | |
| 109 | The short-circuiting operators C<&&>, C<||>, and C<//> are now |
| 110 | considerably faster in the short-circuiting case due to reduced |
| 111 | OP-tree traversal. |
| 112 | |
| 113 | =item * |
| 114 | |
| 115 | The implementation of C<s///r> makes one less copy of the scalar's value. |
| 116 | |
| 117 | =item * |
| 118 | |
| 119 | If a studied scalar is C<split> with a regex, the engine will now take |
| 120 | advantage of the C<study> data. |
| 121 | |
| 122 | =item * |
| 123 | |
| 124 | C<study> now uses considerably less memory for shorter strings. Strings shorter |
| 125 | than 65535 characters use roughly half the memory than previously, strings |
| 126 | shorter than 255 characters use roughly one quarter of the memory. |
| 127 | |
| 128 | =item * |
| 129 | |
| 130 | Recursive calls to lvalue subroutines in lvalue scalar context use less |
| 131 | memory. |
| 132 | |
| 133 | =back |
| 134 | |
| 135 | =head1 Modules and Pragmata |
| 136 | |
| 137 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
| 138 | go here. If Module::CoreList is updated, generate an initial draft of the |
| 139 | following sections using F<Porting/corelist-perldelta.pl>, which prints stub |
| 140 | entries to STDOUT. Results can be pasted in place of the '=head2' entries |
| 141 | below. A paragraph summary for important changes should then be added by hand. |
| 142 | In an ideal world, dual-life modules would have a F<Changes> file that could be |
| 143 | cribbed. |
| 144 | |
| 145 | [ Within each section, list entries as a =item entry ] |
| 146 | |
| 147 | =head2 New Modules and Pragmata |
| 148 | |
| 149 | =over 4 |
| 150 | |
| 151 | =item * |
| 152 | |
| 153 | The logic for parsing, merging, and dumping XS typemaps has been extracted |
| 154 | from C<ExtUtils::ParseXS> into a module of its own, L<ExtUtils::Typemaps>. |
| 155 | C<ExtUtils::Typemaps> offers an interface to typemap handling outside of |
| 156 | the scope of the XS compiler itself. |
| 157 | |
| 158 | As a first use case of the improved API and extensibility, typemaps can now |
| 159 | be included inline in XS code with a HEREDOC-like syntax: |
| 160 | |
| 161 | TYPEMAP: <<END_TYPEMAP |
| 162 | MyType T_IV |
| 163 | END_TYPEMAP |
| 164 | |
| 165 | =back |
| 166 | |
| 167 | =head2 Updated Modules and Pragmata |
| 168 | |
| 169 | =over 4 |
| 170 | |
| 171 | =item * |
| 172 | |
| 173 | L<B::Deparse> has been upgrade from version 1.05 to 1.06. |
| 174 | |
| 175 | It now correctly deparses interpolation of punctuation variables (like |
| 176 | C<@*>) that do not interpolate without braces [perl #93990]. |
| 177 | |
| 178 | =item * |
| 179 | |
| 180 | L<CGI> has been upgraded from version 3.54 to version 3.55 |
| 181 | |
| 182 | [THINGS THAT MAY BREAK YOUR CODE] |
| 183 | |
| 184 | C<url()> was fixed to return C<PATH_INFO> when it is explicitly requested |
| 185 | with either the path=>1 or path_info=>1 flag. |
| 186 | |
| 187 | If your code is running under mod_rewrite (or compatible) and you are calling C<self_url()> or |
| 188 | you are calling C<url()> and passing path_info=>1, These methods will actually be |
| 189 | returning C<PATH_INFO> now, as you have explicitly requested, or has C<self_url()> |
| 190 | has requested on your behalf. |
| 191 | |
| 192 | The C<PATH_INFO> has been omitted in such URLs since the issue was introduced |
| 193 | in the 3.12 release in December, 2005. |
| 194 | |
| 195 | This bug is so old your application may have come to depend on it or |
| 196 | workaround it. Check for application before upgrading to this release. |
| 197 | |
| 198 | Examples of affected method calls: |
| 199 | |
| 200 | $q->url(-absolute => 1, -query => 1, -path_info => 1 ) |
| 201 | $q->url(-path=>1) |
| 202 | $q->url(-full=>1,-path=>1) |
| 203 | $q->url(-rewrite=>1,-path=>1) |
| 204 | $q->self_url(); |
| 205 | |
| 206 | =item * |
| 207 | |
| 208 | L<Compress::Raw::Bzip2> has been upgraded from version 2.035 to version 2.037 |
| 209 | |
| 210 | =item * |
| 211 | |
| 212 | L<Compress::Raw::Zlib> has been upgraded from version 2.035 to version 2.037 |
| 213 | |
| 214 | Added offset parameter to CRC32 |
| 215 | |
| 216 | =item * |
| 217 | |
| 218 | L<Compress::Zlib> has been upgraded from version 2.035 to version 2.037 |
| 219 | |
| 220 | IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14). |
| 221 | There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed |
| 222 | Stored context now. And fixed a Zip64 issue in |
| 223 | IO::Compress::Zip when the content size was exactly 0xFFFFFFFF. |
| 224 | |
| 225 | =item * |
| 226 | |
| 227 | L<CPANPLUS> has been upgraded from version 0.9105 to version 0.9107 |
| 228 | |
| 229 | =item * |
| 230 | |
| 231 | L<Cwd> has been upgraded from version 3.36 to 3.37, to address an |
| 232 | incompatibility with the EPIC debugger. |
| 233 | |
| 234 | =item * |
| 235 | |
| 236 | L<diagnostics> has been upgraded from version 1.22 to 1.23. |
| 237 | |
| 238 | It now knows how to find descriptions for diagnostic messages ending with a |
| 239 | dot, instead getting confused by it. |
| 240 | |
| 241 | =item * |
| 242 | |
| 243 | L<ExtUtils::MakeMaker> has been upgraded from version 6.57_05 to version 6.58 |
| 244 | |
| 245 | =item * |
| 246 | |
| 247 | L<ExtUtils::ParseXS> has been upgraded from version 2.2210 to 3.00_01. |
| 248 | |
| 249 | Much of L<ExtUtils::ParseXS>, the module behind the XS compiler C<xsubpp>, |
| 250 | was rewritten and cleaned up. It has been made somewhat more extensible |
| 251 | and now finally uses strictures. |
| 252 | |
| 253 | The typemap logic has been moved into a separate module, |
| 254 | L<ExtUtils::Typemaps>. See L</New Modules and Pragmata>, above. |
| 255 | |
| 256 | =item * |
| 257 | |
| 258 | L<IPC::Cmd> has been upgraded from version 0.70 to version 0.72 |
| 259 | |
| 260 | Capturing of command output (both C<STDOUT> and C<STDERR>) is now supported |
| 261 | using L<IPC::Open3> on MSWin32 without requiring L<IPC::Run>. |
| 262 | |
| 263 | =item * |
| 264 | |
| 265 | L<Locale::Codes> has been upgraded from version 3.16 to version 3.17 |
| 266 | |
| 267 | Added Language Extension codes (langext) and Language Variation codes |
| 268 | (langvar) as defined in the IANA language registry. |
| 269 | |
| 270 | Added language codes from ISO 639-5 |
| 271 | |
| 272 | Added language/script codes from the IANA language subtag |
| 273 | registry |
| 274 | |
| 275 | Fixed an uninitialized value warning. RT 67438 |
| 276 | |
| 277 | Fixed the return value for the all_XXX_codes and all_XXX_names functions. RT 69100 |
| 278 | |
| 279 | Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to |
| 280 | allow for cleaner future additions. The original four modules (Locale::Language, |
| 281 | Locale::Currency, Locale::Country, Locale::Script) will continue to work, but |
| 282 | all new sets of codes will be added in the Locale::Codes namespace. |
| 283 | |
| 284 | =item * |
| 285 | |
| 286 | L<attributes> has been upgraded from version 0.14 to 0.15, as part of the |
| 287 | lvalue attribute warnings fix. See L</Selected Bug Fixes>, below. |
| 288 | |
| 289 | =item * |
| 290 | |
| 291 | L<Math::BigInt::FastCalc> has been upgraded from version 0.28 to version 0.29. |
| 292 | |
| 293 | The XS code is now compiled with C<PERL_NO_GET_CONTEXT>, which will aid |
| 294 | performance under ithreads. |
| 295 | |
| 296 | =item * |
| 297 | |
| 298 | XXX This will probably be 2.53 for 5.15.1, as there has been a CPAN |
| 299 | release of 2.52. |
| 300 | |
| 301 | L<Module::CoreList> has been upgraded from version 2.51 to 2.53. |
| 302 | |
| 303 | Some extraneous (and erroneous) entries have been removed |
| 304 | [rt.cpan.org #69108]. |
| 305 | |
| 306 | The C<corelist> utility now understands the C<-r> option for |
| 307 | displaying Perl release dates. |
| 308 | |
| 309 | =item * |
| 310 | |
| 311 | L<Pod::Perldoc> has been upgraded from version 3.15_05 to 3.15_06. |
| 312 | |
| 313 | The B<-v> option now fetches the right section for C<$0>. |
| 314 | |
| 315 | =item * |
| 316 | |
| 317 | L<Pod::Simple> has been upgraded from version 3.16 to version 3.17 |
| 318 | |
| 319 | =item * |
| 320 | |
| 321 | L<Unicode::Collate> has been upgraded from version 0.76 to version 0.77 |
| 322 | |
| 323 | Applied [perl #93470] silencing compiler warnings with -Wwrite-strings |
| 324 | |
| 325 | =item * |
| 326 | |
| 327 | L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200 |
| 328 | |
| 329 | Added SetStdHandle and GetStdHandle functions |
| 330 | |
| 331 | =item * |
| 332 | |
| 333 | L<threads> has been upgraded from version 1.83 to 1.84 |
| 334 | |
| 335 | An unused variable was removed from the XS code. |
| 336 | |
| 337 | =back |
| 338 | |
| 339 | =head2 Removed Modules and Pragmata |
| 340 | |
| 341 | =over 4 |
| 342 | |
| 343 | =item * |
| 344 | |
| 345 | Perl 4-era .pl libraries |
| 346 | |
| 347 | Perl used to bundle a handful of library files that predate Perl 5. Most of |
| 348 | these files, which have been deprecated since version 5.14.0, have now been |
| 349 | removed. If your code still relies on these libraries, you can install them |
| 350 | again from C<Perl4::CoreLibs> on CPAN. |
| 351 | |
| 352 | =back |
| 353 | |
| 354 | =head1 Documentation |
| 355 | |
| 356 | XXX Changes to files in F<pod/> go here. Consider grouping entries by |
| 357 | file and be sure to link to the appropriate page, e.g. L<perlfunc>. |
| 358 | |
| 359 | =head2 New Documentation |
| 360 | |
| 361 | XXX Changes which create B<new> files in F<pod/> go here. |
| 362 | |
| 363 | =head3 L<perldtrace> |
| 364 | |
| 365 | L<perldtrace> describes Perl's DTrace support, listing the provided probes |
| 366 | and gives examples of their use. |
| 367 | |
| 368 | =head3 L<perl5141delta> |
| 369 | |
| 370 | The delta file for Perl 5.14.1 has been copied to blead. |
| 371 | |
| 372 | =head2 Changes to Existing Documentation |
| 373 | |
| 374 | XXX Changes which significantly change existing files in F<pod/> go here. |
| 375 | However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics> |
| 376 | section. |
| 377 | |
| 378 | =head3 L<XXX> |
| 379 | |
| 380 | =over 4 |
| 381 | |
| 382 | =item * |
| 383 | |
| 384 | XXX Description of the change here |
| 385 | |
| 386 | =item * |
| 387 | |
| 388 | L<perlxs> was extended with documentation on inline typemaps. |
| 389 | |
| 390 | =item * |
| 391 | |
| 392 | L<perlref> has a new L<Circular References|perlref/Circular References> |
| 393 | section explaining how circularities may not be freed and how to solve that |
| 394 | with weak references. |
| 395 | |
| 396 | =item * |
| 397 | |
| 398 | The documentation for smart match in L<perlsyn> has been corrected for the |
| 399 | case of C<undef> on the left-hand side. The list of different smart match |
| 400 | behaviours had an item in the wrong place. |
| 401 | |
| 402 | =back |
| 403 | |
| 404 | =head1 Diagnostics |
| 405 | |
| 406 | The following additions or changes have been made to diagnostic output, |
| 407 | including warnings and fatal error messages. For the complete list of |
| 408 | diagnostic messages, see L<perldiag>. |
| 409 | |
| 410 | XXX New or changed warnings emitted by the core's C<C> code go here. Also |
| 411 | include any changes in L<perldiag> that reconcile it to the C<C> code. |
| 412 | |
| 413 | [ Within each section, list entries as a =item entry that links to perldiag, |
| 414 | e.g. |
| 415 | |
| 416 | =item * |
| 417 | |
| 418 | L<Invalid version object|perldiag/"Invalid version object"> |
| 419 | ] |
| 420 | |
| 421 | =head2 New Diagnostics |
| 422 | |
| 423 | XXX Newly added diagnostic messages go here |
| 424 | |
| 425 | =head3 New Errors |
| 426 | |
| 427 | =over 4 |
| 428 | |
| 429 | =item * |
| 430 | |
| 431 | XXX L<message|perldiag/"message"> |
| 432 | |
| 433 | =back |
| 434 | |
| 435 | =head3 New Warnings |
| 436 | |
| 437 | =over 4 |
| 438 | |
| 439 | =item * |
| 440 | |
| 441 | XXX L<message|perldiag/"message"> |
| 442 | |
| 443 | =back |
| 444 | |
| 445 | =head2 Changes to Existing Diagnostics |
| 446 | |
| 447 | XXX Changes (i.e. rewording) of diagnostic messages go here |
| 448 | |
| 449 | =over 4 |
| 450 | |
| 451 | =item * |
| 452 | |
| 453 | The L<Invalid version format|perldiag/"Invalid version format (%s)"> |
| 454 | error message now says "negative version number" within the parentheses, |
| 455 | rather than "non-numeric data", for negative numbers. |
| 456 | |
| 457 | =item * |
| 458 | |
| 459 | The two warnings |
| 460 | L<Possible attempt to put comments in qw() list|perldiag/"Possible attempt to put comments in qw() list"> |
| 461 | and |
| 462 | L<Possible attempt to separate words with commas|perldiag/"Possible attempt to separate words with commas"> |
| 463 | are no longer mutually exclusive: the same C<qw> construct may produce |
| 464 | both. |
| 465 | |
| 466 | =item * |
| 467 | |
| 468 | Warnings that mention the names of lexical (C<my>) variables with Unicode |
| 469 | characters in them now respect the presence or absence of the C<:utf8> |
| 470 | layer on the output handle, instead of outputting UTF8 regardless. Also, |
| 471 | the correct names are included in the strings passed to C<$SIG{__WARN__}> |
| 472 | handlers, rather than the raw UTF8 bytes. |
| 473 | |
| 474 | =back |
| 475 | |
| 476 | =head1 Utility Changes |
| 477 | |
| 478 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go |
| 479 | here. Most of these are built within the directories F<utils> and F<x2p>. |
| 480 | |
| 481 | [ List utility changes as a =head3 entry for each utility and =item |
| 482 | entries for each change |
| 483 | Use L<XXX> with program names to get proper documentation linking. ] |
| 484 | |
| 485 | =head3 L<XXX> |
| 486 | |
| 487 | =over 4 |
| 488 | |
| 489 | =item * |
| 490 | |
| 491 | XXX |
| 492 | |
| 493 | =back |
| 494 | |
| 495 | =head1 Configuration and Compilation |
| 496 | |
| 497 | XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools |
| 498 | go here. Any other changes to the Perl build process should be listed here. |
| 499 | However, any platform-specific changes should be listed in the |
| 500 | L</Platform Support> section, instead. |
| 501 | |
| 502 | [ List changes as a =item entry ]. |
| 503 | |
| 504 | =over 4 |
| 505 | |
| 506 | =item * |
| 507 | |
| 508 | XXX |
| 509 | |
| 510 | =back |
| 511 | |
| 512 | =head1 Testing |
| 513 | |
| 514 | XXX Any significant changes to the testing of a freshly built perl should be |
| 515 | listed here. Changes which create B<new> files in F<t/> go here as do any |
| 516 | large changes to the testing harness (e.g. when parallel testing was added). |
| 517 | Changes to existing files in F<t/> aren't worth summarising, although the bugs |
| 518 | that they represent may be covered elsewhere. |
| 519 | |
| 520 | [ List each test improvement as a =item entry ] |
| 521 | |
| 522 | =over 4 |
| 523 | |
| 524 | =item * |
| 525 | |
| 526 | F<t/run/dtrace.t> was added to test Perl's DTrace support. This |
| 527 | test will only be run if your Perl was built with C<-Dusedtrace> |
| 528 | and if calling C<dtrace> actually lets you instrument code. This |
| 529 | generally requires being run as root, so this test file is primarily |
| 530 | intended for use by the dtrace subcommittee of p5p. |
| 531 | |
| 532 | =back |
| 533 | |
| 534 | =head1 Platform Support |
| 535 | |
| 536 | XXX Any changes to platform support should be listed in the sections below. |
| 537 | |
| 538 | [ Within the sections, list each platform as a =item entry with specific |
| 539 | changes as paragraphs below it. ] |
| 540 | |
| 541 | =head2 New Platforms |
| 542 | |
| 543 | XXX List any platforms that this version of perl compiles on, that previous |
| 544 | versions did not. These will either be enabled by new files in the F<hints/> |
| 545 | directories, or new subdirectories and F<README> files at the top level of the |
| 546 | source tree. |
| 547 | |
| 548 | =over 4 |
| 549 | |
| 550 | =item XXX-some-platform |
| 551 | |
| 552 | XXX |
| 553 | |
| 554 | =back |
| 555 | |
| 556 | =head2 Discontinued Platforms |
| 557 | |
| 558 | XXX List any platforms that this version of perl no longer compiles on. |
| 559 | |
| 560 | =over 4 |
| 561 | |
| 562 | =item XXX-some-platform |
| 563 | |
| 564 | XXX |
| 565 | |
| 566 | =back |
| 567 | |
| 568 | =head2 Platform-Specific Notes |
| 569 | |
| 570 | XXX List any changes for specific platforms. This could include configuration |
| 571 | and compilation changes or changes in portability/compatibility. However, |
| 572 | changes within modules for platforms should generally be listed in the |
| 573 | L</Modules and Pragmata> section. |
| 574 | |
| 575 | =over 4 |
| 576 | |
| 577 | =item XXX-some-platform |
| 578 | |
| 579 | XXX |
| 580 | |
| 581 | =back |
| 582 | |
| 583 | =head1 Internal Changes |
| 584 | |
| 585 | XXX Changes which affect the interface available to C<XS> code go here. |
| 586 | Other significant internal changes for future core maintainers should |
| 587 | be noted as well. |
| 588 | |
| 589 | [ List each change as a =item entry ] |
| 590 | |
| 591 | =over 4 |
| 592 | |
| 593 | =item * |
| 594 | |
| 595 | XXX |
| 596 | |
| 597 | =back |
| 598 | |
| 599 | =head1 Selected Bug Fixes |
| 600 | |
| 601 | XXX Important bug fixes in the core language are summarised here. |
| 602 | Bug fixes in files in F<ext/> and F<lib/> are best summarised in |
| 603 | L</Modules and Pragmata>. |
| 604 | |
| 605 | [ List each fix as a =item entry ] |
| 606 | |
| 607 | =over 4 |
| 608 | |
| 609 | =item * |
| 610 | |
| 611 | Applying the :lvalue attribute to subroutine that is already defined does |
| 612 | not work properly, as the attribute changes the way the sub is compiled. |
| 613 | Hence, Perl 5.12 began warning when an attempt is made to apply the |
| 614 | attribute to an already defined sub. In such cases, the attribute is |
| 615 | discarded. |
| 616 | |
| 617 | But the change in 5.12 missed the case where custom attributes are also |
| 618 | present: that case still silently and ineffectively applied the attribute. |
| 619 | That omission has now been corrected. C<sub foo :lvalue :Whatever> (when |
| 620 | C<foo> is already defined) now warns about the :lvalue attribute, and does |
| 621 | not apply it. |
| 622 | |
| 623 | L<attributes.pm|attributes> has likewise been updated to warn and not apply |
| 624 | the attribute. |
| 625 | |
| 626 | =item * |
| 627 | |
| 628 | =for comment |
| 629 | Not necessary for perl5160delta |
| 630 | |
| 631 | The remaining discrepancies between explicit and implicit return from |
| 632 | lvalue subroutines have been resolved. They mainly involved which error |
| 633 | message to display when a read-only value is returned in lvalue context. |
| 634 | Also, returning a PADTMP (the result of most built-ins, like C<index>) in |
| 635 | lvalue context is now forbidden for explicit return, as it always has been |
| 636 | for implicit return. This is not a regression from 5.14, as all the cases |
| 637 | in which it could happen where previously syntax errors. |
| 638 | |
| 639 | =item * |
| 640 | |
| 641 | =for comment |
| 642 | Not necessary for perl5160delta |
| 643 | |
| 644 | Explicitly returning a tied C<my> variable from an lvalue subroutine in |
| 645 | list lvalue context used to clear the variable before the assignment could |
| 646 | happen. This is something that was missed when explicit return was made to |
| 647 | work in 5.15.0. |
| 648 | |
| 649 | =item * |
| 650 | |
| 651 | =for comment |
| 652 | Not necessary for perl5160delta |
| 653 | |
| 654 | A minor memory leak, introduced in 5.15.0, has been fixed. It would occur |
| 655 | when a hash is freed that has had its current iterator deleted |
| 656 | [perl #93454]. |
| 657 | |
| 658 | =item * |
| 659 | |
| 660 | The C<prototype> function now returns a prototype (the empty string) for |
| 661 | the C<__FILE__>, C<__LINE__> and C<__PACKAGE__> directives, instead of |
| 662 | dying, as they are indistinguishable syntactically from nullary functions |
| 663 | like C<time>. |
| 664 | |
| 665 | =item * |
| 666 | |
| 667 | A bug affecting lvalue context propagation through nested lvalue subroutine |
| 668 | calls has been fixed. Previously, returning a value in nested rvalue |
| 669 | context would be treated as lvalue context by the inner subroutine call, |
| 670 | resulting in some values (such as read-only values) being rejected. |
| 671 | |
| 672 | =item * |
| 673 | |
| 674 | Some core bugs affecting L<Hash::Util> have been fixed: locking a hash |
| 675 | element that is a glob copy no longer causes subsequent assignment to it to |
| 676 | corrupt the glob, and unlocking a hash element that holds a copy-on-write |
| 677 | scalar no longer causes modifications to that scalar to modify other |
| 678 | scalars that were sharing the same string buffer. |
| 679 | |
| 680 | =item * |
| 681 | |
| 682 | C<when> blocks are now capable of returning variables declared inside the |
| 683 | enclosing C<given> block [perl #93548]. |
| 684 | |
| 685 | =item * |
| 686 | |
| 687 | A problem with context propagation when a C<do> block is an argument to |
| 688 | C<return> has been fixed. It used to cause undefined to be returned in |
| 689 | some cases of a C<return> inside an C<if> block which itself is followed by |
| 690 | another C<return>. |
| 691 | |
| 692 | =item * |
| 693 | |
| 694 | Calling C<index> with a tainted constant no longer causes constants in |
| 695 | subsequently compiled code to become tainted [perl #64804]. |
| 696 | |
| 697 | =item * |
| 698 | |
| 699 | The C<SvIsCOW> C macro now returns false for read-only copies of typeglobs, |
| 700 | such as those created by: |
| 701 | |
| 702 | $hash{elem} = *foo; |
| 703 | Hash::Util::lock_value %hash, 'elem'; |
| 704 | |
| 705 | It used to return true. |
| 706 | |
| 707 | =back |
| 708 | |
| 709 | =head1 Known Problems |
| 710 | |
| 711 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any |
| 712 | tests that had to be C<TODO>ed for the release would be noted here, unless |
| 713 | they were specific to a particular platform (see below). |
| 714 | |
| 715 | This is a list of some significant unfixed bugs, which are regressions |
| 716 | from either 5.XXX.XXX or 5.XXX.XXX. |
| 717 | |
| 718 | [ List each fix as a =item entry ] |
| 719 | |
| 720 | =over 4 |
| 721 | |
| 722 | =item * |
| 723 | |
| 724 | XXX |
| 725 | |
| 726 | =back |
| 727 | |
| 728 | =head1 Obituary |
| 729 | |
| 730 | XXX If any significant core contributor has died, we've added a short obituary |
| 731 | here. |
| 732 | |
| 733 | =head1 Acknowledgements |
| 734 | |
| 735 | Generate this with: |
| 736 | |
| 737 | perl Porting/acknowledgements.pl v5.15.0..HEAD |
| 738 | |
| 739 | =head1 Reporting Bugs |
| 740 | |
| 741 | If you find what you think is a bug, you might check the articles |
| 742 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
| 743 | bug database at http://rt.perl.org/perlbug/ . There may also be |
| 744 | information at http://www.perl.org/ , the Perl Home Page. |
| 745 | |
| 746 | If you believe you have an unreported bug, please run the L<perlbug> |
| 747 | program included with your release. Be sure to trim your bug down |
| 748 | to a tiny but sufficient test case. Your bug report, along with the |
| 749 | output of C<perl -V>, will be sent off to perlbug@perl.org to be |
| 750 | analysed by the Perl porting team. |
| 751 | |
| 752 | If the bug you are reporting has security implications, which make it |
| 753 | inappropriate to send to a publicly archived mailing list, then please send |
| 754 | it to perl5-security-report@perl.org. This points to a closed subscription |
| 755 | unarchived mailing list, which includes |
| 756 | all the core committers, who will be able |
| 757 | to help assess the impact of issues, figure out a resolution, and help |
| 758 | co-ordinate the release of patches to mitigate or fix the problem across all |
| 759 | platforms on which Perl is supported. Please only use this address for |
| 760 | security issues in the Perl core, not for modules independently |
| 761 | distributed on CPAN. |
| 762 | |
| 763 | =head1 SEE ALSO |
| 764 | |
| 765 | The F<Changes> file for an explanation of how to view exhaustive details |
| 766 | on what changed. |
| 767 | |
| 768 | The F<INSTALL> file for how to build Perl. |
| 769 | |
| 770 | The F<README> file for general stuff. |
| 771 | |
| 772 | The F<Artistic> and F<Copying> files for copyright information. |
| 773 | |
| 774 | =cut |