This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
e9aff67e6e56a3591ba67680556f994b6ca58f36
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for comment
4 This has been completed up to c60dbbc38, except for:
5 d9018cbe5b480ba29cc6151aba8f5102a7e009c4 (Eric Brine)
6     -- while I (use git blame to find out who) see how this change within
7        lex_read_unichar is correct, I cannot tell at a glance what visible
8        effects this bug has at the Perl level or through the lexer API.
9 a04eb69c733e84250299f12df200f10b76b0a45c (David Golden)
10 7a799f6bb3cac2e1bf9bede83579324cffa59c16 (David Golden)
11 be48bbe8d671b6841c3ec7cb734b98071afe3cd9 (Chip)
12
13 =head1 NAME
14
15 [ this is a template for a new perldelta file. Any text flagged as
16 XXX needs to be processed before release. ]
17
18 perldelta - what is new for perl v5.15.4
19
20 =head1 DESCRIPTION
21
22 This document describes differences between the 5.15.3 release and
23 the 5.15.4 release.
24
25 If you are upgrading from an earlier release such as 5.15.3, first read
26 L<perl5153delta>, which describes differences between 5.15.3 and
27 5.15.4.
28
29 =head1 Notice
30
31 XXX Any important notices here
32
33 =head1 Core Enhancements
34
35 =head2 $^X converted to an absolute path on FreeBSD, OS X and Solaris
36
37 C<$^X> is now converted to an absolute path on OS X, FreeBSD (without
38 needing F</proc> mounted) and Solaris 10 and 11. This augments the
39 previous approach of using F</proc> on Linux, FreeBSD and NetBSD
40 (in all cases, where mounted).
41
42 This makes relocatable perl installations more useful on these platforms.
43 (See "Relocatable @INC" in F<INSTALL>)
44
45 =head2 Unicode Symbol Names
46
47 Perl now has proper support for Unicode in symbol names.  It used to be
48 that C<*{$foo}> would ignore the internal UTF8 flag and use the bytes of
49 the underlying representation to look up the symbol.  That meant that
50 C<*{"\x{100}"}> and C<*{"\xc4\x80"}> would return the same thing.  All
51 these parts of Perl have been fixed to account for Unicode:
52
53 =over
54
55 =item *
56
57 Method names (including those passed to C<use overload>)
58
59 =item *
60
61 Typeglob names (including names of variables, subroutines and filehandles)
62
63 =item *
64
65 Package names
66
67 =item *
68
69 Constant subroutine names (not nul-clean yet)
70
71 =item *
72
73 C<goto>
74
75 =item *
76
77 Symbolic dereferencing
78
79 =item *
80
81 Second argument to C<bless()> and C<tie()>
82
83 =item *
84
85 Return value of C<ref()>
86
87 =item *
88
89 Package names returned by C<caller()>
90
91 =item *
92
93 Subroutine prototypes
94
95 =item *
96
97 Attributes
98
99 =item *
100
101 Various warnings and error messages that mention variable names or values,
102 methods, etc.
103
104 =back
105
106 In addition, a parsing bug has been fixed that prevented C<*{é}> from
107 implicitly quoting the name, but instead interpreted it as C<*{+é}>, which
108 would cause a strict violation.
109
110 C<*{"*a::b"}> automatically strips off the * if it is followed by an ASCII
111 letter.  That has been extended to all Unicode identifier characters.
112
113 C<$é> is now subject to "Used only once" warnings.  It used to be exempt,
114 as it was treated as a punctuation variable.
115
116 =head2 Support for Embedded Nuls
117
118 Some parts of Perl did not work correctly with nuls (C<chr 0>) embedded in
119 strings.  That meant that, for instance, C<< $m = "a\0b"; foo->$m >> would
120 call the "a" method, instead of the actual method name contained in $m.
121 These parts of perl have been fixed to support nuls:
122
123 =over
124
125 =item *
126
127 Method names
128
129 =item *
130
131 Typeglob names (including filehandle names)
132
133 =item *
134
135 Package names
136
137 =item *
138
139 Autoloading
140
141 =item *
142
143 Return value of C<ref()>
144
145 =item *
146
147 Package names returned by C<caller()>
148
149 =item *
150
151 Filehandle warnings
152
153 =item *
154
155 Typeglob elements (C<*foo{"THING\0stuff"}>)
156
157 =item *
158
159 Signal names
160
161 =item *
162
163 Various warnings and error messages that mention variable names or values,
164 methods, etc.
165
166 =back
167
168 One side effect of these changes is that blessing into "\0" no longer
169 causes C<ref()> to return false.
170
171 =head1 Security
172
173 XXX Any security-related notices go here.  In particular, any security
174 vulnerabilities closed should be noted here rather than in the
175 L</Selected Bug Fixes> section.
176
177 [ List each security issue as a =head2 entry ]
178
179 =head1 Incompatible Changes
180
181 XXX For a release on a stable branch, this section aspires to be:
182
183     There are no changes intentionally incompatible with 5.XXX.XXX
184     If any exist, they are bugs and reports are welcome.
185
186 [ List each incompatible change as a =head2 entry ]
187
188 =head1 Deprecations
189
190 XXX Any deprecated features, syntax, modules etc. should be listed here.
191 In particular, deprecated modules should be listed here even if they are
192 listed as an updated module in the L</Modules and Pragmata> section.
193
194 [ List each deprecation as a =head2 entry ]
195
196 =head1 Performance Enhancements
197
198 XXX Changes which enhance performance without changing behaviour go here. There
199 may well be none in a stable release.
200
201 [ List each enhancement as a =item entry ]
202
203 =over 4
204
205 =item *
206
207 XXX
208
209 =back
210
211 =head1 Modules and Pragmata
212
213 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
214 go here.  If Module::CoreList is updated, generate an initial draft of the
215 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
216 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
217 below.  A paragraph summary for important changes should then be added by hand.
218 In an ideal world, dual-life modules would have a F<Changes> file that could be
219 cribbed.
220
221 [ Within each section, list entries as a =item entry ]
222
223 =head2 New Modules and Pragmata
224
225 =over 4
226
227 =item *
228
229 XXX
230
231 =back
232
233 =head2 Updated Modules and Pragmata
234
235 =over 4
236
237 =item *
238
239 L<perlfaq> has been upgraded from version 5.0150034 to version 5.0150035.
240
241 =item *
242
243 L<Digest> has been upgraded from version 1.16 to version 1.17.
244
245 =item *
246
247 L<DynaLoader> has been upgraded from version 1.13 to 1.14.
248
249 It stopped exporting its symbols with the ExtUtils::ParseXS changes in
250 5.15.2.  Now it exports them once more.  
251
252 =item *
253
254 L<ExtUtils::MakeMaker> has been upgraded from version 6.59 to version 6.61_01.
255
256 =item *
257
258 L<ExtUtils::ParseXS> has been upgraded from version 3.04_04 to version 3.05.
259
260 =item *
261
262 L<Module::Load> has been upgraded from version 0.20 to version 0.22.
263
264 Resolve possible security problem [http://goo.gl/YzHRU] where a '::' prefixed
265 module can 'jump' out of @INC
266
267 =item *
268
269 L<Unicode::Collate> has been upgraded from version 0.78 to version 0.79.
270
271 =back
272
273 =head2 Removed Modules and Pragmata
274
275 =over 4
276
277 =item *
278
279 XXX
280
281 =back
282
283 =head1 Documentation
284
285 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
286 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
287
288 =head2 New Documentation
289
290 XXX Changes which create B<new> files in F<pod/> go here.
291
292 =head3 L<XXX>
293
294 XXX Description of the purpose of the new file here
295
296 =head2 Changes to Existing Documentation
297
298 XXX Changes which significantly change existing files in F<pod/> go here.
299 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
300 section.
301
302 =head3 L<perlfunc>, L<open>
303
304 =over 4
305
306 =item *
307
308 As an accident of history, C<open $fh, "<:", ...> applies the default
309 layers for the platform (C<:raw> on Unix, C<:crlf> on Windows), ignoring
310 whatever is declared by L<open.pm|open>.  This seems such a useful feature
311 it has been documented in L<perlfunc|perlfunc/open> and L<open>.
312
313 =back
314
315 =head1 Diagnostics
316
317 The following additions or changes have been made to diagnostic output,
318 including warnings and fatal error messages.  For the complete list of
319 diagnostic messages, see L<perldiag>.
320
321 XXX New or changed warnings emitted by the core's C<C> code go here. Also
322 include any changes in L<perldiag> that reconcile it to the C<C> code.
323
324 [ Within each section, list entries as a =item entry that links to perldiag,
325   e.g.
326
327   =item *
328
329   L<Invalid version object|perldiag/"Invalid version object">
330 ]
331
332 =head2 New Diagnostics
333
334 XXX Newly added diagnostic messages go here
335
336 =head3 New Errors
337
338 =over 4
339
340 =item *
341
342 XXX L<message|perldiag/"message">
343
344 =back
345
346 =head3 New Warnings
347
348 =over 4
349
350 =item *
351
352 XXX L<message|perldiag/"message">
353
354 =back
355
356 =head2 Changes to Existing Diagnostics
357
358 XXX Changes (i.e. rewording) of diagnostic messages go here
359
360 =over 4
361
362 =item *
363
364 The message,
365 "Code point 0x%X is not Unicode, no properties match it; all inverse
366 prop erties do" has been changed to "Code point 0x%X is not Unicode, all
367 \p{} matches fail; all \P{} matches succeed"
368
369
370 =back
371
372 =head1 Utility Changes
373
374 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
375 here. Most of these are built within the directories F<utils> and F<x2p>.
376
377 [ List utility changes as a =head3 entry for each utility and =item
378 entries for each change
379 Use L<XXX> with program names to get proper documentation linking. ]
380
381 =head3 L<XXX>
382
383 =over 4
384
385 =item *
386
387 XXX
388
389 =back
390
391 =head1 Configuration and Compilation
392
393 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
394 go here.  Any other changes to the Perl build process should be listed here.
395 However, any platform-specific changes should be listed in the
396 L</Platform Support> section, instead.
397
398 [ List changes as a =item entry ].
399
400 =over 4
401
402 =item *
403
404 XXX
405
406 =back
407
408 =head1 Testing
409
410 XXX Any significant changes to the testing of a freshly built perl should be
411 listed here.  Changes which create B<new> files in F<t/> go here as do any
412 large changes to the testing harness (e.g. when parallel testing was added).
413 Changes to existing files in F<t/> aren't worth summarising, although the bugs
414 that they represent may be covered elsewhere.
415
416 [ List each test improvement as a =item entry ]
417
418 =over 4
419
420 =item *
421
422 F<t/porting/checkcfgvar.t> now tests that all config.sh-style files are
423 complete. These are used by the various non-*nix to generate their
424 F<config.h>, and an incomplete input file will generate invalid output.
425
426 =back
427
428 =head1 Platform Support
429
430 XXX Any changes to platform support should be listed in the sections below.
431
432 [ Within the sections, list each platform as a =item entry with specific
433 changes as paragraphs below it. ]
434
435 =head2 New Platforms
436
437 XXX List any platforms that this version of perl compiles on, that previous
438 versions did not. These will either be enabled by new files in the F<hints/>
439 directories, or new subdirectories and F<README> files at the top level of the
440 source tree.
441
442 =over 4
443
444 =item XXX-some-platform
445
446 XXX
447
448 =back
449
450 =head2 Discontinued Platforms
451
452 XXX List any platforms that this version of perl no longer compiles on.
453
454 =over 4
455
456 =item XXX-some-platform
457
458 XXX
459
460 =back
461
462 =head2 Platform-Specific Notes
463
464 XXX List any changes for specific platforms. This could include configuration
465 and compilation changes or changes in portability/compatibility.  However,
466 changes within modules for platforms should generally be listed in the
467 L</Modules and Pragmata> section.
468
469 =over 4
470
471 =item XXX-some-platform
472
473 XXX
474
475 =back
476
477 =head1 Internal Changes
478
479 XXX Changes which affect the interface available to C<XS> code go here.
480 Other significant internal changes for future core maintainers should
481 be noted as well.
482
483 [ List each change as a =item entry ]
484
485 =over 4
486
487 =item *
488
489 These new functions have been added as part of the work on Unicode symbols:
490
491     HvNAMELEN
492     HvNAMEUTF8
493     HvENAMELEN
494     HvENAMEUTF8
495     gv_init_pv
496     gv_init_pvn
497     gv_init_pvsv
498     gv_fetchmeth_pv
499     gv_fetchmeth_pvn
500     gv_fetchmeth_sv
501     gv_fetchmeth_pv_autoload
502     gv_fetchmeth_pvn_autoload
503     gv_fetchmeth_sv_autoload
504     gv_fetchmethod_pv_flags
505     gv_fetchmethod_pvn_flags
506     gv_fetchmethod_sv_flags
507     gv_autoload_pv
508     gv_autoload_pvn
509     gv_autoload_sv
510     newGVgen_flags
511     sv_derived_from_pv
512     sv_derived_from_pvn
513     sv_derived_from_sv
514     sv_does_pv
515     sv_does_pvn
516     sv_does_sv
517     whichsig_pv
518     whichsig_pvn
519     whichsig_sv
520
521 The gv_fetchmethod_*_flags functions, like gv_fetchmethod_flags, are
522 experimental and may change in a future release.
523
524 =item *
525
526 The following functions were added.  These are I<not> part of the API:
527
528     GvNAMEUTF8
529     GvENAMELEN
530     GvENAME_HEK
531     CopSTASH_flags
532     CopSTASH_flags_set
533     PmopSTASH_flags
534     PmopSTASH_flags_set
535     sv_sethek
536
537 =item *
538
539 C<sv_catpvn_flags> takes a couple of new internal-only flags,
540 C<SV_CATBYTES> and C<SV_CATUTF8>, which tell it whether the char array to
541 be concatenated is UTF8.  This allows for more efficient concatenation than
542 creating temporary SVs to pass to C<sv_catsv>.
543
544 =back
545
546 =head1 Selected Bug Fixes
547
548 XXX Important bug fixes in the core language are summarised here.
549 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
550 L</Modules and Pragmata>.
551
552 [ List each fix as a =item entry ]
553
554 =over 4
555
556 =item *
557
558 In Perl 5.14.0, C<$tainted ~~ @array> stopped working properly.  Sometimes
559 it would erroneously fail (when C<$tainted> contained a string that occurs
560 in the array I<after> the first element) or erroneously succeed (when
561 C<undef> occurred after the first element) [perl #93590].
562
563 =item *
564
565 Perl 5.15.0 introduced a minor regression, in that an object referenced by
566 a deleted hash element would be able to access the freed element from its
567 DESTROY method, causing panic errors [perl #99660].
568
569 =item *
570
571 Functions in the CORE package can now be called as methods.  That used to
572 work only when they had been called or referenced already.  So
573 C<< "foo"->CORE::ucfirst >> returns Foo.
574
575 =item *
576
577 C<use> and C<require> are no longer affected by the I/O layers active in
578 the caller's scope (enabled by L<open.pm|open>) [perl #96008].
579
580 =item *
581
582 Errors that occur when methods cannot be found during overloading now
583 mention the correct package name, as they did in 5.8.x, instead of
584 erroneously mentioning the "overload" package, as they have since 5.10.0.
585
586 =item *
587
588 Undefining C<%overload::> no longer causes a crash.
589
590 =item *
591
592 C<our $::é; $é> (which is invalid) no longer produces the "Compilation
593 error at lib/utf8_heavy.pl..." error message, which it started emitting in
594 5.10.0 [perl #99984].
595
596 =item *
597
598 A minor regression, introduced Perl 5.15.0, has been fixed in which some
599 regular expression Unicode property matches (C<\p{...}>) matched
600 non-Unicode code points.
601
602 =back
603
604 =head1 Known Problems
605
606 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
607 tests that had to be C<TODO>ed for the release would be noted here, unless
608 they were specific to a particular platform (see below).
609
610 This is a list of some significant unfixed bugs, which are regressions
611 from either 5.XXX.XXX or 5.XXX.XXX.
612
613 [ List each fix as a =item entry ]
614
615 =over 4
616
617 =item *
618
619 XXX A couple of modules were broken by stdbool.h changes, or was that in
620 5.15.3?
621
622 =back
623
624 =head1 Obituary
625
626 XXX If any significant core contributor has died, we've added a short obituary
627 here.
628
629 =head1 Acknowledgements
630
631 XXX Generate this with:
632
633   perl Porting/acknowledgements.pl v5.15.3..HEAD
634
635 =head1 Reporting Bugs
636
637 If you find what you think is a bug, you might check the articles
638 recently posted to the comp.lang.perl.misc newsgroup and the perl
639 bug database at http://rt.perl.org/perlbug/ .  There may also be
640 information at http://www.perl.org/ , the Perl Home Page.
641
642 If you believe you have an unreported bug, please run the L<perlbug>
643 program included with your release.  Be sure to trim your bug down
644 to a tiny but sufficient test case.  Your bug report, along with the
645 output of C<perl -V>, will be sent off to perlbug@perl.org to be
646 analysed by the Perl porting team.
647
648 If the bug you are reporting has security implications, which make it
649 inappropriate to send to a publicly archived mailing list, then please send
650 it to perl5-security-report@perl.org. This points to a closed subscription
651 unarchived mailing list, which includes
652 all the core committers, who will be able
653 to help assess the impact of issues, figure out a resolution, and help
654 co-ordinate the release of patches to mitigate or fix the problem across all
655 platforms on which Perl is supported. Please only use this address for
656 security issues in the Perl core, not for modules independently
657 distributed on CPAN.
658
659 =head1 SEE ALSO
660
661 The F<Changes> file for an explanation of how to view exhaustive details
662 on what changed.
663
664 The F<INSTALL> file for how to build Perl.
665
666 The F<README> file for general stuff.
667
668 The F<Artistic> and F<Copying> files for copyright information.
669
670 =cut