This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document and test the phase-change probe
[perl5.git] / pod / perldelta.pod
... / ...
CommitLineData
1=encoding utf8
2
3=head1 NAME
4
5[ this is a template for a new perldelta file. Any text flagged as
6XXX needs to be processed before release. ]
7
8perldelta - what is new for perl v5.15.1
9
10=head1 DESCRIPTION
11
12This document describes differences between the 5.15.1 release and
13the 5.15.0 release.
14
15If you are upgrading from an earlier release such as 5.14.0, first read
16L<perl5150delta>, which describes differences between 5.14.0 and
175.15.0.
18
19=head1 Notice
20
21XXX Any important notices here
22
23=head1 Core Enhancements
24
25XXX New core language features go here. Summarise user-visible core language
26enhancements. Particularly prominent performance optimisations could go
27here, but most should go in the L</Performance Enhancements> section.
28
29[ List each enhancement as a =head2 entry ]
30
31=head2 C<splice()> doesn't warn when truncating
32
33You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
34worrying about warnings.
35
36=head2 The C<\$> prototype accepts any scalar lvalue
37
38The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
39argument. Previously they only accepted scalars beginning with C<$> and
40hash and array elements. This change makes them consistent with the way
41the built-in C<read> and C<recv> functions (among others) parse their
42arguments. This means that one can override the built-in functions with
43custom subroutines that parse their arguments the same way.
44
45=head2 You can now C<study> more than one string
46
47The restriction that you can only have one C<study> active at a time has been
48removed. You can now usefully C<study> as many strings as you want (until you
49exhaust memory).
50
51=head2 The Unicode C<Script_Extensions> property is now supported.
52
53New in Unicode 6.0, this is an improved C<Script> property. Details
54are in L<perlunicode/Scripts>.
55
56=head2 DTrace probes for interpreter phase change
57
58The C<phase-change> probes will fire when the interpreter's phase
59changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
60the new phase name; C<arg1> is the old one. This is useful mostly
61for limiting your instrumentation to one or more of: compile time,
62run time, destruct time.
63
64=head1 Security
65
66XXX Any security-related notices go here. In particular, any security
67vulnerabilities closed should be noted here rather than in the
68L</Selected Bug Fixes> section.
69
70[ List each security issue as a =head2 entry ]
71
72=head1 Incompatible Changes
73
74XXX For a release on a stable branch, this section aspires to be:
75
76 There are no changes intentionally incompatible with 5.XXX.XXX
77 If any exist, they are bugs and reports are welcome.
78
79[ List each incompatible change as a =head2 entry ]
80
81=head1 Deprecations
82
83XXX Any deprecated features, syntax, modules etc. should be listed here.
84In particular, deprecated modules should be listed here even if they are
85listed as an updated module in the L</Modules and Pragmata> section.
86
87[ List each deprecation as a =head2 entry ]
88
89=head1 Performance Enhancements
90
91XXX Changes which enhance performance without changing behaviour go here. There
92may well be none in a stable release.
93
94[ List each enhancement as a =item entry ]
95
96=over 4
97
98=item *
99
100The implementation of C<s///r> makes one less copy of the scalar's value.
101
102=item *
103
104If a studied scalar is C<split> with a regex, the engine will now take
105advantage of the C<study> data.
106
107=item *
108
109C<study> now uses considerably less memory for shorter strings. Strings shorter
110than 65535 characters use roughly half the memory than previously, strings
111shorter than 255 characters use roughly one quarter of the memory.
112
113=item *
114
115Recursive calls to lvalue subroutines in lvalue scalar context use less
116memory.
117
118=back
119
120=head1 Modules and Pragmata
121
122XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
123go here. If Module::CoreList is updated, generate an initial draft of the
124following sections using F<Porting/corelist-perldelta.pl>, which prints stub
125entries to STDOUT. Results can be pasted in place of the '=head2' entries
126below. A paragraph summary for important changes should then be added by hand.
127In an ideal world, dual-life modules would have a F<Changes> file that could be
128cribbed.
129
130[ Within each section, list entries as a =item entry ]
131
132=head2 New Modules and Pragmata
133
134=over 4
135
136=item *
137
138XXX
139
140=back
141
142=head2 Updated Modules and Pragmata
143
144=over 4
145
146=item *
147
148L<CGI> has been upgraded from version 3.54 to version 3.55
149
150[THINGS THAT MAY BREAK YOUR CODE]
151
152C<url()> was fixed to return C<PATH_INFO> when it is explicitly requested
153with either the path=>1 or path_info=>1 flag.
154
155If your code is running under mod_rewrite (or compatible) and you are calling C<self_url()> or
156you are calling C<url()> and passing path_info=>1, These methods will actually be
157returning C<PATH_INFO> now, as you have explicitly requested, or has C<self_url()>
158has requested on your behalf.
159
160The C<PATH_INFO> has been omitted in such URLs since the issue was introduced
161in the 3.12 release in December, 2005.
162
163This bug is so old your application may have come to depend on it or
164workaround it. Check for application before upgrading to this release.
165
166Examples of affected method calls:
167
168 $q->url(-absolute => 1, -query => 1, -path_info => 1 )
169 $q->url(-path=>1)
170 $q->url(-full=>1,-path=>1)
171 $q->url(-rewrite=>1,-path=>1)
172 $q->self_url();
173
174=item *
175
176L<Compress::Raw::Bzip2> has been upgraded from version 2.035 to version 2.037
177
178=item *
179
180L<Compress::Raw::Zlib> has been upgraded from version 2.035 to version 2.037
181
182Added offset parameter to CRC32
183
184=item *
185
186L<Compress::Zlib> has been upgraded from version 2.035 to version 2.037
187
188IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14).
189There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed
190Stored context now. And fixed a Zip64 issue in
191IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
192
193=item *
194
195L<CPANPLUS> has been upgraded from version 0.9105 to version 0.9106
196
197=item *
198
199L<ExtUtils::MakeMaker> has been upgraded from version 6.57_05 to version 6.58
200
201=item *
202
203L<IPC::Cmd> has been upgraded from version 0.70 to version 0.72
204
205Capturing of command output (both C<STDOUT> and C<STDERR>) is now supported
206using L<IPC::Open3> on MSWin32 without requiring L<IPC::Run>.
207
208=item *
209
210L<Locale::Codes> has been upgraded from version 3.16 to version 3.17
211
212Added Language Extension codes (langext) and Language Variation codes
213(langvar) as defined in the IANA language registry.
214
215Added language codes from ISO 639-5
216
217Added language/script codes from the IANA language subtag
218registry
219
220Fixed an uninitialized value warning. RT 67438
221
222Fixed the return value for the all_XXX_codes and all_XXX_names functions. RT 69100
223
224Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to
225allow for cleaner future additions. The original four modules (Locale::Language,
226Locale::Currency, Locale::Country, Locale::Script) will continue to work, but
227all new sets of codes will be added in the Locale::Codes namespace.
228
229=item *
230
231L<attributes> has been upgraded from version 0.14 to 0.15, as part of the
232lvalue attribute warnings fix. See L</Selected Bug Fixes>, below.
233
234=item *
235
236L<Math::BigInt::FastCalc> has been upgraded from version 0.28 to version 0.29.
237
238The XS code is now compiled with C<PERL_NO_GET_CONTEXT>, which will aid
239performance under ithreads.
240
241=item *
242
243L<Pod::Simple> has been upgraded from version 3.16 to version 3.17
244
245=item *
246
247L<Unicode::Collate> has been upgraded from version 0.76 to version 0.77
248
249Applied [perl #93470] silencing compiler warnings with -Wwrite-strings
250
251=item *
252
253L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200
254
255Added SetStdHandle and GetStdHandle functions
256
257=item *
258
259L<threads> has been upgraded from version 1.83 to 1.84
260
261An unused variable was removed from the XS code.
262
263=back
264
265=head2 Removed Modules and Pragmata
266
267=over 4
268
269=item *
270
271Perl 4-era .pl libraries
272
273Perl used to bundle a handful of library files that predate Perl 5. Most of
274these files, which have been deprecated since version 5.14.0, have now been
275removed. If your code still relies on these libraries, you can install them
276again from C<Perl4::CoreLibs> on CPAN.
277
278=back
279
280=head1 Documentation
281
282XXX Changes to files in F<pod/> go here. Consider grouping entries by
283file and be sure to link to the appropriate page, e.g. L<perlfunc>.
284
285=head2 New Documentation
286
287XXX Changes which create B<new> files in F<pod/> go here.
288
289=head3 L<perldtrace>
290
291L<perldtrace> describes Perl's DTrace support, listing the provided probes
292and gives examples of their use.
293
294=head2 Changes to Existing Documentation
295
296XXX Changes which significantly change existing files in F<pod/> go here.
297However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
298section.
299
300=head3 L<XXX>
301
302=over 4
303
304=item *
305
306XXX Description of the change here
307
308=back
309
310=head1 Diagnostics
311
312The following additions or changes have been made to diagnostic output,
313including warnings and fatal error messages. For the complete list of
314diagnostic messages, see L<perldiag>.
315
316XXX New or changed warnings emitted by the core's C<C> code go here. Also
317include any changes in L<perldiag> that reconcile it to the C<C> code.
318
319[ Within each section, list entries as a =item entry that links to perldiag,
320 e.g.
321
322 =item *
323
324 L<Invalid version object|perldiag/"Invalid version object">
325]
326
327=head2 New Diagnostics
328
329XXX Newly added diagnostic messages go here
330
331=head3 New Errors
332
333=over 4
334
335=item *
336
337XXX L<message|perldiag/"message">
338
339=back
340
341=head3 New Warnings
342
343=over 4
344
345=item *
346
347XXX L<message|perldiag/"message">
348
349=back
350
351=head2 Changes to Existing Diagnostics
352
353XXX Changes (i.e. rewording) of diagnostic messages go here
354
355=over 4
356
357=item *
358
359XXX Describe change here
360
361=back
362
363=head1 Utility Changes
364
365XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
366here. Most of these are built within the directories F<utils> and F<x2p>.
367
368[ List utility changes as a =head3 entry for each utility and =item
369entries for each change
370Use L<XXX> with program names to get proper documentation linking. ]
371
372=head3 L<XXX>
373
374=over 4
375
376=item *
377
378XXX
379
380=back
381
382=head1 Configuration and Compilation
383
384XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
385go here. Any other changes to the Perl build process should be listed here.
386However, any platform-specific changes should be listed in the
387L</Platform Support> section, instead.
388
389[ List changes as a =item entry ].
390
391=over 4
392
393=item *
394
395XXX
396
397=back
398
399=head1 Testing
400
401XXX Any significant changes to the testing of a freshly built perl should be
402listed here. Changes which create B<new> files in F<t/> go here as do any
403large changes to the testing harness (e.g. when parallel testing was added).
404Changes to existing files in F<t/> aren't worth summarising, although the bugs
405that they represent may be covered elsewhere.
406
407[ List each test improvement as a =item entry ]
408
409=over 4
410
411=item *
412
413F<t/run/dtrace.t> was added to test Perl's DTrace support. This
414test will only be run if your Perl was built with C<-Dusedtrace>
415and if calling C<dtrace> actually lets you instrument code. This
416generally requires being run as root, so this test file is primarily
417intended for use by the dtrace subcommittee of p5p.
418
419=back
420
421=head1 Platform Support
422
423XXX Any changes to platform support should be listed in the sections below.
424
425[ Within the sections, list each platform as a =item entry with specific
426changes as paragraphs below it. ]
427
428=head2 New Platforms
429
430XXX List any platforms that this version of perl compiles on, that previous
431versions did not. These will either be enabled by new files in the F<hints/>
432directories, or new subdirectories and F<README> files at the top level of the
433source tree.
434
435=over 4
436
437=item XXX-some-platform
438
439XXX
440
441=back
442
443=head2 Discontinued Platforms
444
445XXX List any platforms that this version of perl no longer compiles on.
446
447=over 4
448
449=item XXX-some-platform
450
451XXX
452
453=back
454
455=head2 Platform-Specific Notes
456
457XXX List any changes for specific platforms. This could include configuration
458and compilation changes or changes in portability/compatibility. However,
459changes within modules for platforms should generally be listed in the
460L</Modules and Pragmata> section.
461
462=over 4
463
464=item XXX-some-platform
465
466XXX
467
468=back
469
470=head1 Internal Changes
471
472XXX Changes which affect the interface available to C<XS> code go here.
473Other significant internal changes for future core maintainers should
474be noted as well.
475
476[ List each change as a =item entry ]
477
478=over 4
479
480=item *
481
482XXX
483
484=back
485
486=head1 Selected Bug Fixes
487
488XXX Important bug fixes in the core language are summarised here.
489Bug fixes in files in F<ext/> and F<lib/> are best summarised in
490L</Modules and Pragmata>.
491
492[ List each fix as a =item entry ]
493
494=over 4
495
496=item *
497
498Applying the :lvalue attribute to subroutine that is already defined does
499not work properly, as the attribute changes the way the sub is compiled.
500Hence, Perl 5.12 began warning when an attempt is made to apply the
501attribute to an already defined sub. In such cases, the attribute is
502discarded.
503
504But the change in 5.12 missed the case where custom attributes are also
505present: that case still silently and ineffectively applied the attribute.
506That omission has now been corrected. C<sub foo :lvalue :Whatever> (when
507C<foo> is already defined) now warns about the :lvalue attribute, and does
508not apply it.
509
510L<attributes.pm|attributes> has likewise been updated to warn and not apply
511the attribute.
512
513=item *
514
515=for comment
516Not necessary for perl5160delta
517
518The remaining discrepancies between explicit and implicit return from
519lvalue subroutines have been resolved. They mainly involved which error
520message to display when a read-only value is returned in lvalue context.
521Also, returning a PADTMP (the result of most built-ins, like C<index>) in
522lvalue context is now forbidden for explicit return, as it always has been
523for implicit return. This is not a regression from 5.14, as all the cases
524in which it could happen where previously syntax errors.
525
526=item *
527
528=for comment
529Not necessary for perl5160delta
530
531Explicitly returning a tied C<my> variable from an lvalue subroutine in
532list lvalue context used to clear the variable before the assignment could
533happen. This is something that was missed when explicit return was made to
534work in 5.15.0.
535
536=item *
537
538=for comment
539Not necessary for perl5160delta
540
541A minor memory leak, introduced in 5.15.0, has been fixed. It would occur
542when a hash is freed that has had its current iterator deleted
543[perl #93454].
544
545=item *
546
547The C<prototype> function now returns a prototype (the empty string) for
548the C<__FILE__>, C<__LINE__> and C<__PACKAGE__> directives, instead of
549dying, as they are indistinguishable syntactically from nullary functions
550like C<time>.
551
552=item *
553
554A bug affecting lvalue context propagation through nested lvalue subroutine
555calls has been fixed. Previously, returning a value in nested rvalue
556context would be treated as lvalue context by the inner subroutine call,
557resulting in some values (such as read-only values) being rejected.
558
559=back
560
561=head1 Known Problems
562
563XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
564tests that had to be C<TODO>ed for the release would be noted here, unless
565they were specific to a particular platform (see below).
566
567This is a list of some significant unfixed bugs, which are regressions
568from either 5.XXX.XXX or 5.XXX.XXX.
569
570[ List each fix as a =item entry ]
571
572=over 4
573
574=item *
575
576XXX
577
578=back
579
580=head1 Obituary
581
582XXX If any significant core contributor has died, we've added a short obituary
583here.
584
585=head1 Acknowledgements
586
587XXX The list of people to thank goes here.
588
589=head1 Reporting Bugs
590
591If you find what you think is a bug, you might check the articles
592recently posted to the comp.lang.perl.misc newsgroup and the perl
593bug database at http://rt.perl.org/perlbug/ . There may also be
594information at http://www.perl.org/ , the Perl Home Page.
595
596If you believe you have an unreported bug, please run the L<perlbug>
597program included with your release. Be sure to trim your bug down
598to a tiny but sufficient test case. Your bug report, along with the
599output of C<perl -V>, will be sent off to perlbug@perl.org to be
600analysed by the Perl porting team.
601
602If the bug you are reporting has security implications, which make it
603inappropriate to send to a publicly archived mailing list, then please send
604it to perl5-security-report@perl.org. This points to a closed subscription
605unarchived mailing list, which includes
606all the core committers, who will be able
607to help assess the impact of issues, figure out a resolution, and help
608co-ordinate the release of patches to mitigate or fix the problem across all
609platforms on which Perl is supported. Please only use this address for
610security issues in the Perl core, not for modules independently
611distributed on CPAN.
612
613=head1 SEE ALSO
614
615The F<Changes> file for an explanation of how to view exhaustive details
616on what changed.
617
618The F<INSTALL> file for how to build Perl.
619
620The F<README> file for general stuff.
621
622The F<Artistic> and F<Copying> files for copyright information.
623
624=cut