5 [ this is a template for a new perldelta file. Any text flagged as
6 XXX needs to be processed before release. ]
8 perldelta - what is new for perl v5.15.1
12 This document describes differences between the 5.15.1 release and
15 If you are upgrading from an earlier release such as 5.14.0, first read
16 L<perl5150delta>, which describes differences between 5.14.0 and
21 XXX Any important notices here
23 =head1 Core Enhancements
25 XXX New core language features go here. Summarise user-visible core language
26 enhancements. Particularly prominent performance optimisations could go
27 here, but most should go in the L</Performance Enhancements> section.
29 [ List each enhancement as a =head2 entry ]
31 =head2 C<splice()> doesn't warn when truncating
33 You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
34 worrying about warnings.
36 =head2 The C<\$> prototype accepts any scalar lvalue
38 The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
39 argument. Previously they only accepted scalars beginning with C<$> and
40 hash and array elements. This change makes them consistent with the way
41 the built-in C<read> and C<recv> functions (among others) parse their
42 arguments. This means that one can override the built-in functions with
43 custom subroutines that parse their arguments the same way.
45 =head2 You can now C<study> more than one string
47 The restriction that you can only have one C<study> active at a time has been
48 removed. You can now usefully C<study> as many strings as you want (until you
51 =head2 The Unicode C<Script_Extensions> property is now supported.
53 New in Unicode 6.0, this is an improved C<Script> property. Details
54 are in L<perlunicode/Scripts>.
56 =head2 DTrace probes for interpreter phase change
58 The C<phase-change> probes will fire when the interpreter's phase
59 changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
60 the new phase name; C<arg1> is the old one. This is useful mostly
61 for limiting your instrumentation to one or more of: compile time,
62 run time, destruct time.
66 XXX Any security-related notices go here. In particular, any security
67 vulnerabilities closed should be noted here rather than in the
68 L</Selected Bug Fixes> section.
70 [ List each security issue as a =head2 entry ]
72 =head1 Incompatible Changes
74 XXX For a release on a stable branch, this section aspires to be:
76 There are no changes intentionally incompatible with 5.XXX.XXX
77 If any exist, they are bugs and reports are welcome.
79 [ List each incompatible change as a =head2 entry ]
83 XXX Any deprecated features, syntax, modules etc. should be listed here.
84 In particular, deprecated modules should be listed here even if they are
85 listed as an updated module in the L</Modules and Pragmata> section.
87 [ List each deprecation as a =head2 entry ]
89 =head1 Performance Enhancements
91 XXX Changes which enhance performance without changing behaviour go here. There
92 may well be none in a stable release.
94 [ List each enhancement as a =item entry ]
100 The implementation of C<s///r> makes one less copy of the scalar's value.
104 If a studied scalar is C<split> with a regex, the engine will now take
105 advantage of the C<study> data.
109 C<study> now uses considerably less memory for shorter strings. Strings shorter
110 than 65535 characters use roughly half the memory than previously, strings
111 shorter than 255 characters use roughly one quarter of the memory.
115 Recursive calls to lvalue subroutines in lvalue scalar context use less
120 =head1 Modules and Pragmata
122 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
123 go here. If Module::CoreList is updated, generate an initial draft of the
124 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
125 entries to STDOUT. Results can be pasted in place of the '=head2' entries
126 below. A paragraph summary for important changes should then be added by hand.
127 In an ideal world, dual-life modules would have a F<Changes> file that could be
130 [ Within each section, list entries as a =item entry ]
132 =head2 New Modules and Pragmata
142 =head2 Updated Modules and Pragmata
148 L<CGI> has been upgraded from version 3.54 to version 3.55
150 [THINGS THAT MAY BREAK YOUR CODE]
152 C<url()> was fixed to return C<PATH_INFO> when it is explicitly requested
153 with either the path=>1 or path_info=>1 flag.
155 If your code is running under mod_rewrite (or compatible) and you are calling C<self_url()> or
156 you are calling C<url()> and passing path_info=>1, These methods will actually be
157 returning C<PATH_INFO> now, as you have explicitly requested, or has C<self_url()>
158 has requested on your behalf.
160 The C<PATH_INFO> has been omitted in such URLs since the issue was introduced
161 in the 3.12 release in December, 2005.
163 This bug is so old your application may have come to depend on it or
164 workaround it. Check for application before upgrading to this release.
166 Examples of affected method calls:
168 $q->url(-absolute => 1, -query => 1, -path_info => 1 )
170 $q->url(-full=>1,-path=>1)
171 $q->url(-rewrite=>1,-path=>1)
176 L<Compress::Raw::Bzip2> has been upgraded from version 2.035 to version 2.037
180 L<Compress::Raw::Zlib> has been upgraded from version 2.035 to version 2.037
182 Added offset parameter to CRC32
186 L<Compress::Zlib> has been upgraded from version 2.035 to version 2.037
188 IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14).
189 There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed
190 Stored context now. And fixed a Zip64 issue in
191 IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
195 L<CPANPLUS> has been upgraded from version 0.9105 to version 0.9107
199 L<ExtUtils::MakeMaker> has been upgraded from version 6.57_05 to version 6.58
203 L<IPC::Cmd> has been upgraded from version 0.70 to version 0.72
205 Capturing of command output (both C<STDOUT> and C<STDERR>) is now supported
206 using L<IPC::Open3> on MSWin32 without requiring L<IPC::Run>.
210 L<Locale::Codes> has been upgraded from version 3.16 to version 3.17
212 Added Language Extension codes (langext) and Language Variation codes
213 (langvar) as defined in the IANA language registry.
215 Added language codes from ISO 639-5
217 Added language/script codes from the IANA language subtag
220 Fixed an uninitialized value warning. RT 67438
222 Fixed the return value for the all_XXX_codes and all_XXX_names functions. RT 69100
224 Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to
225 allow for cleaner future additions. The original four modules (Locale::Language,
226 Locale::Currency, Locale::Country, Locale::Script) will continue to work, but
227 all new sets of codes will be added in the Locale::Codes namespace.
231 L<attributes> has been upgraded from version 0.14 to 0.15, as part of the
232 lvalue attribute warnings fix. See L</Selected Bug Fixes>, below.
236 L<Math::BigInt::FastCalc> has been upgraded from version 0.28 to version 0.29.
238 The XS code is now compiled with C<PERL_NO_GET_CONTEXT>, which will aid
239 performance under ithreads.
243 L<Pod::Simple> has been upgraded from version 3.16 to version 3.17
247 L<Unicode::Collate> has been upgraded from version 0.76 to version 0.77
249 Applied [perl #93470] silencing compiler warnings with -Wwrite-strings
253 L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200
255 Added SetStdHandle and GetStdHandle functions
259 L<threads> has been upgraded from version 1.83 to 1.84
261 An unused variable was removed from the XS code.
265 =head2 Removed Modules and Pragmata
271 Perl 4-era .pl libraries
273 Perl used to bundle a handful of library files that predate Perl 5. Most of
274 these files, which have been deprecated since version 5.14.0, have now been
275 removed. If your code still relies on these libraries, you can install them
276 again from C<Perl4::CoreLibs> on CPAN.
282 XXX Changes to files in F<pod/> go here. Consider grouping entries by
283 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
285 =head2 New Documentation
287 XXX Changes which create B<new> files in F<pod/> go here.
291 L<perldtrace> describes Perl's DTrace support, listing the provided probes
292 and gives examples of their use.
294 =head2 Changes to Existing Documentation
296 XXX Changes which significantly change existing files in F<pod/> go here.
297 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
306 XXX Description of the change here
312 The following additions or changes have been made to diagnostic output,
313 including warnings and fatal error messages. For the complete list of
314 diagnostic messages, see L<perldiag>.
316 XXX New or changed warnings emitted by the core's C<C> code go here. Also
317 include any changes in L<perldiag> that reconcile it to the C<C> code.
319 [ Within each section, list entries as a =item entry that links to perldiag,
324 L<Invalid version object|perldiag/"Invalid version object">
327 =head2 New Diagnostics
329 XXX Newly added diagnostic messages go here
337 XXX L<message|perldiag/"message">
347 XXX L<message|perldiag/"message">
351 =head2 Changes to Existing Diagnostics
353 XXX Changes (i.e. rewording) of diagnostic messages go here
359 XXX Describe change here
363 =head1 Utility Changes
365 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
366 here. Most of these are built within the directories F<utils> and F<x2p>.
368 [ List utility changes as a =head3 entry for each utility and =item
369 entries for each change
370 Use L<XXX> with program names to get proper documentation linking. ]
382 =head1 Configuration and Compilation
384 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
385 go here. Any other changes to the Perl build process should be listed here.
386 However, any platform-specific changes should be listed in the
387 L</Platform Support> section, instead.
389 [ List changes as a =item entry ].
401 XXX Any significant changes to the testing of a freshly built perl should be
402 listed here. Changes which create B<new> files in F<t/> go here as do any
403 large changes to the testing harness (e.g. when parallel testing was added).
404 Changes to existing files in F<t/> aren't worth summarising, although the bugs
405 that they represent may be covered elsewhere.
407 [ List each test improvement as a =item entry ]
413 F<t/run/dtrace.t> was added to test Perl's DTrace support. This
414 test will only be run if your Perl was built with C<-Dusedtrace>
415 and if calling C<dtrace> actually lets you instrument code. This
416 generally requires being run as root, so this test file is primarily
417 intended for use by the dtrace subcommittee of p5p.
421 =head1 Platform Support
423 XXX Any changes to platform support should be listed in the sections below.
425 [ Within the sections, list each platform as a =item entry with specific
426 changes as paragraphs below it. ]
430 XXX List any platforms that this version of perl compiles on, that previous
431 versions did not. These will either be enabled by new files in the F<hints/>
432 directories, or new subdirectories and F<README> files at the top level of the
437 =item XXX-some-platform
443 =head2 Discontinued Platforms
445 XXX List any platforms that this version of perl no longer compiles on.
449 =item XXX-some-platform
455 =head2 Platform-Specific Notes
457 XXX List any changes for specific platforms. This could include configuration
458 and compilation changes or changes in portability/compatibility. However,
459 changes within modules for platforms should generally be listed in the
460 L</Modules and Pragmata> section.
464 =item XXX-some-platform
470 =head1 Internal Changes
472 XXX Changes which affect the interface available to C<XS> code go here.
473 Other significant internal changes for future core maintainers should
476 [ List each change as a =item entry ]
486 =head1 Selected Bug Fixes
488 XXX Important bug fixes in the core language are summarised here.
489 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
490 L</Modules and Pragmata>.
492 [ List each fix as a =item entry ]
498 Applying the :lvalue attribute to subroutine that is already defined does
499 not work properly, as the attribute changes the way the sub is compiled.
500 Hence, Perl 5.12 began warning when an attempt is made to apply the
501 attribute to an already defined sub. In such cases, the attribute is
504 But the change in 5.12 missed the case where custom attributes are also
505 present: that case still silently and ineffectively applied the attribute.
506 That omission has now been corrected. C<sub foo :lvalue :Whatever> (when
507 C<foo> is already defined) now warns about the :lvalue attribute, and does
510 L<attributes.pm|attributes> has likewise been updated to warn and not apply
516 Not necessary for perl5160delta
518 The remaining discrepancies between explicit and implicit return from
519 lvalue subroutines have been resolved. They mainly involved which error
520 message to display when a read-only value is returned in lvalue context.
521 Also, returning a PADTMP (the result of most built-ins, like C<index>) in
522 lvalue context is now forbidden for explicit return, as it always has been
523 for implicit return. This is not a regression from 5.14, as all the cases
524 in which it could happen where previously syntax errors.
529 Not necessary for perl5160delta
531 Explicitly returning a tied C<my> variable from an lvalue subroutine in
532 list lvalue context used to clear the variable before the assignment could
533 happen. This is something that was missed when explicit return was made to
539 Not necessary for perl5160delta
541 A minor memory leak, introduced in 5.15.0, has been fixed. It would occur
542 when a hash is freed that has had its current iterator deleted
547 The C<prototype> function now returns a prototype (the empty string) for
548 the C<__FILE__>, C<__LINE__> and C<__PACKAGE__> directives, instead of
549 dying, as they are indistinguishable syntactically from nullary functions
554 A bug affecting lvalue context propagation through nested lvalue subroutine
555 calls has been fixed. Previously, returning a value in nested rvalue
556 context would be treated as lvalue context by the inner subroutine call,
557 resulting in some values (such as read-only values) being rejected.
561 =head1 Known Problems
563 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
564 tests that had to be C<TODO>ed for the release would be noted here, unless
565 they were specific to a particular platform (see below).
567 This is a list of some significant unfixed bugs, which are regressions
568 from either 5.XXX.XXX or 5.XXX.XXX.
570 [ List each fix as a =item entry ]
582 XXX If any significant core contributor has died, we've added a short obituary
585 =head1 Acknowledgements
587 XXX The list of people to thank goes here.
589 =head1 Reporting Bugs
591 If you find what you think is a bug, you might check the articles
592 recently posted to the comp.lang.perl.misc newsgroup and the perl
593 bug database at http://rt.perl.org/perlbug/ . There may also be
594 information at http://www.perl.org/ , the Perl Home Page.
596 If you believe you have an unreported bug, please run the L<perlbug>
597 program included with your release. Be sure to trim your bug down
598 to a tiny but sufficient test case. Your bug report, along with the
599 output of C<perl -V>, will be sent off to perlbug@perl.org to be
600 analysed by the Perl porting team.
602 If the bug you are reporting has security implications, which make it
603 inappropriate to send to a publicly archived mailing list, then please send
604 it to perl5-security-report@perl.org. This points to a closed subscription
605 unarchived mailing list, which includes
606 all the core committers, who will be able
607 to help assess the impact of issues, figure out a resolution, and help
608 co-ordinate the release of patches to mitigate or fix the problem across all
609 platforms on which Perl is supported. Please only use this address for
610 security issues in the Perl core, not for modules independently
615 The F<Changes> file for an explanation of how to view exhaustive details
618 The F<INSTALL> file for how to build Perl.
620 The F<README> file for general stuff.
622 The F<Artistic> and F<Copying> files for copyright information.