This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tidy up lists of 'our' variables.
[perl5.git] / pod / perl5139delta.pod
CommitLineData
d17f3dbc
JV
1=encoding utf8
2
3=head1 NAME
4
5perl5139delta - what is new for perl v5.13.9
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.13.8 release and
10the 5.13.9 release.
11
12If you are upgrading from an earlier release such as 5.13.7, first read
13L<perl5138delta>, which describes differences between 5.13.7 and
145.13.8.
15
16=head1 Core Enhancements
17
18=head2 New regular expression modifier C</a>
19
20The C</a> regular expression modifier restricts C<\s> to match precisely
21the five characters C<[ \f\n\r\t]>, C<\d> to match precisely the 10
22characters C<[0-9]>, C<\w> to match precisely the 63 characters
23C<[A-Za-z0-9_]>, and the Posix (C<[[:posix:]]>) character classes to
24match only the appropriate ASCII characters. The complements, of
25course, match everything but; and C<\b> and C<\B> are correspondingly
26affected. Otherwise, C</a> behaves like the C</u> modifier, in that
27case-insensitive matching uses Unicode semantics; for example, "k" will
28match the Unicode C<\N{KELVIN SIGN}> under C</i> matching, and code
29points in the Latin1 range, above ASCII will have Unicode semantics when
30it comes to case-insensitive matching. Like its cousins (C</u>, C</l>,
31and C</d>), and in spite of the terminology, C</a> in 5.14 will not
32actually be able to be used as a suffix at the end of a regular
33expression (this restriction is planned to be lifted in 5.16). It must
34occur either as an infix modifier, such as C<(?a:...)> or (C<(?a)...>,
35or it can be turned on within the lexical scope of C<use re '/a'>.
36Turning on C</a> turns off the other "character set" modifiers.
37
38=head2 Any unsigned value can be encoded as a character
39
40With this release, Perl is adopting a model that any unsigned value can
41be treated as a code point and encoded internally (as utf8) without
42warnings -- not just the code points that are legal in Unicode.
43However, unless utf8 warnings have been
44explicitly lexically turned off, outputting or performing a
45Unicode-defined operation (such as upper-casing) on such a code point
46will generate a warning. Attempting to input these using strict rules
47(such as with the C<:encoding('UTF-8')> layer) will continue to fail.
48Prior to this release the handling was very inconsistent, and incorrect
49in places. Also, the Unicode non-characters, some of which previously were
50erroneously considered illegal in places by Perl, contrary to the Unicode
51standard, are now always legal internally. But inputting or outputting
52them will work the same as for the non-legal Unicode code points, as the
53Unicode standard says they are illegal for "open interchange".
54
55=head2 Regular expression debugging output improvement
56
57Regular expression debugging output (turned on by C<use re 'debug';>) now
58uses hexadecimal when escaping non-ASCII characters, instead of octal.
59
60=head1 Security
61
62=head2 Restrict \p{IsUserDefined} to In\w+ and Is\w+
63
64In L<perlunicode/"User-Defined Character Properties">, it says you can
65create custom properties by defining subroutines whose names begin with
66"In" or "Is". However, perl doesn't actually enforce that naming
67restriction, so \p{foo::bar} will call foo::Bar() if it exists.
68
69This commit finally enforces this convention. Note that this broke a
70number of existing tests for properties, since they didn't always use an
71Is/In prefix.
72
73=head1 Incompatible Changes
74
75=head2 All objects are destroyed
76
77It used to be possible to prevent a destructor from being called during
78global destruction by artificially increasing the reference count of an
79object.
80
81Now such objects I<will> will be destroyed, as a result of a bug fix
82L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
83
84This has the potential to break some XS modules. (In fact, it break some.
85See L</Known Problems>, below.)
86
87=head1 Modules and Pragmata
88
89=head2 New Modules and Pragmata
90
91=over 4
92
93=item *
94
95C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a
96subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files
97included with CPAN distributions or generated by the module installation
98toolchain. It should not be used for any other general YAML parsing or
99generation task.
100
101=item *
102
103C<HTTP::Tiny> 0.009 has been added as a dual-life module. It is a very
104small, simple HTTP/1.1 client designed for simple GET requests and file
105mirroring. It has has been added to enable CPAN.pm and CPANPLUS to
106"bootstrap" HTTP access to CPAN using pure Perl without relying on external
107binaries like F<curl> or F<wget>.
108
109=item *
110
111C<JSON::PP> 2.27103 has been added as a dual-life module, for the sake of
112reading F<META.json> files in CPAN distributions.
113
114=item *
115
116C<Module::Metadata> 1.000003 has been added as a dual-life module. It gathers
117package and POD information from Perl module files. It is a standalone module
118based on Module::Build::ModuleInfo for use by other module installation
119toolchain components. Module::Build::ModuleInfo has been deprecated in
120favor of this module instead.
121
122=item *
123
124C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl
125operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types
126with standardized names (e.g. "Unix" or "Windows"). It has been refactored
127out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into
128a single location for easier maintenance.
129
130=back
131
132=head2 Updated Modules and Pragmata
133
134=over 4
135
136=item *
137
138C<Archive::Extract> has been upgraded from version 0.46 to 0.48
139
140=item *
141
142C<Archive::Tar> has been upgraded from version 1.74 to 1.76
143
144=item *
145
146C<CGI> has been upgraded from version 3.50 to 3.51
147
148Further improvements have been made to guard against newline injections
149in headers.
150
151=item *
152
153C<Compress::Raw::Bzip2> has been upgraded from version 2.031 to 2.033
154
155=item *
156
157C<Compress::Raw::Zlib> has been upgraded from version 2.030 to 2.033
158
159=item *
160
161C<CPAN> has been upgraded from version 1.94_62 to 1.94_63
162
163=item *
164
165C<CPANPLUS> has been upgraded from version 0.9010 to 0.9011
166
167=item *
168
169C<CPANPLUS::Dist::Build> has been upgraded from version 0.50 to 0.52
170
171=item *
172
173C<DB_File> has been upgraded from version 1.820 to 1.821
174
175=item *
176
177C<Encode> has been upgraded from version 2.40 to 2.42.
178Now, all 66 Unicode non-characters are treated the same way U+FFFF has
179always been treated; if it was disallowed, all 66 are disallowed; if it
180warned, all 66 warn.
181
182=item *
183
184C<File::Fetch> has been upgraded from version 0.28 to 0.32
185
186=item *
187
188C<IO::Compress> has been upgraded from version 2.030 to 2.033
189
190=item *
191
192C<IPC::Cmd> has been upgraded from version 0.66 to 0.68
193
194=item *
195
196C<Log::Message> has been upgraded from version 0.02 to 0.04
197
198=item *
199
200C<Log::Message::Simple> has been upgraded from version 0.06 to 0.08
201
202=item *
203
204C<Module::Load::Conditional> has been upgraded from version 0.38 to 0.40
205
206=item *
207
208C<Object::Accessor> has been upgraded from version 0.36 to 0.38
209
210=item *
211
212C<Params::Check> has been upgraded from version 0.26 to 0.28
213
214=item *
215
216C<Pod::LaTeX> has been upgraded from version 0.58 to 0.59
217
218=item *
219
220C<Socket> has been updated with new affordances for IPv6,
221including implementations of the C<Socket::getaddrinfo()> and
222C<Socket::getnameinfo()> functions, along with related constants.
223
224=item *
225
226C<Term::UI> has been upgraded from version 0.20 to 0.24
227
228=item *
229
230C<Thread::Queue> has been upgraded from version 2.11 to 2.12.
231
232=item *
233
234C<Thread::Semaphore> has been upgraded from version 2.11 to 2.12.
235
236=item *
237
238C<threads> has been upgraded from version 1.81_03 to 1.82
239
240=item *
241
242C<threads::shared> has been upgraded from version 1.35 to 1.36
243
244=item *
245
246C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000.
247
248=item *
249
250C<Unicode::Normalize> has been upgraded from version 1.07 to 1.10
251
252=item *
253
254C<version> has been upgraded from 0.86 to 0.88.
255
256=item *
257
258C<Win32> has been upgraded from version 0.41 to 0.44.
259
260=back
261
262=head1 Documentation
263
264=head2 Changes to Existing Documentation
265
266=head3 All documentation
267
268=over
269
270=item *
271
272Numerous POD warnings were fixed.
273
274=item *
275
276Many, many spelling errors and typographical mistakes were corrected throughout Perl's core.
277
278=back
279
280=head3 C<perlhack>
281
282=over 4
283
284=item *
285
286C<perlhack> was extensively reorganized.
287
288=back
289
290=head3 C<perlfunc>
291
292=over 4
293
294=item *
295
296It has now been documented that C<ord> returns 0 for an empty string.
297
298=back
299
300=head1 Diagnostics
301
302The following additions or changes have been made to diagnostic output,
303including warnings and fatal error messages. For the complete list of
304diagnostic messages, see L<perldiag>.
305
306=head2 New Diagnostics
307
308=over 4
309
310=item *
311
312Performing an operation requiring Unicode semantics (such as case-folding)
313on a Unicode surrogate or a non-Unicode character now triggers a warning:
314'Operation "%s" returns its argument for ...'.
315
316=back
317
318=head2 Changes to Existing Diagnostics
319
320=over 4
321
322=item *
323
324Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and
325C<gethostent> functions were implemented on a given platform, they would
326all die with the message 'Unsupported socket function "gethostent" called',
327with analogous messages for C<getnet*> and C<getserv*>. This has been
328corrected.
329
330=back
331
332=head1 Utility Changes
333
334=head3 C<perlbug>
335
336=over 4
337
338=item *
339
340C<perlbug> did not previously generate a From: header, potentially
341resulting in dropped mail. Now it does include that header.
342
343=back
344
345=head3 C<buildtoc>
346
347=over 4
348
349=item *
350
351F<pod/buildtoc> has been modernized and can now be used to test the
352well-formedness of F<pod/perltoc.pod> automatically.
353
354=back
355
356=head1 Testing
357
358=over 4
359
360=item *
361
362C<lib/File/DosGlob.t> has been modernized and now uses C<Test::More>.
363
364=item *
365
366A new test script, C<t/porting/filenames.t>, makes sure that filenames and
367paths are reasonably portable.
368
369=item *
370
371C<t/porting/diag.t> is now several orders of magnitude faster.
372
373=item *
374
375C<t/porting/buildtoc.t> now tests that the documentation TOC file is current and well-formed.
376
377=item *
378
379C<t/base/while.t> now tests the basics of a while loop with minimal dependencies.
380
381=item *
382
383C<t/cmd/while.t> now uses F<test.pl> for better maintainability.
384
385=item *
386
387C<t/op/split.t> now tests calls to C<split> without any pattern specified.
388
389=back
390
391
392
393=head1 Platform Support
394
395=head2 Discontinued Platforms
396
397=over 4
398
399=item Apollo DomainOS
400
401The last vestiges of support for this platform have been excised from the
402Perl distribution. It was officially discontinued in version 5.12.0. It had
403not worked for years before that.
404
405=item MacOS Classic
406
407The last vestiges of support for this platform have been excised from the
408Perl distribution. It was officially discontinued in an earlier version.
409
410=back
411
412=head2 Platform-Specific Notes
413
414=over 4
415
d17f3dbc
JV
416=item Cygwin
417
418=over
419
420=item *
421
422Updated MakeMaker to build man pages on cygwin.
423
424=item *
425
426Improved rebase behaviour
427
428If a dll is updated on cygwin reuse the old imagebase address.
429This solves most rebase errors, esp when updating on core dll's.
430See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information.
431
432=item *
433
434Support the standard cyg dll prefix, which is e.g. needed for FFI's.
435
436=item *
437
438Updated build hints file
439
440=back
441
d17f3dbc
JV
442=item Solaris
443
444DTrace is now supported on Solaris. There used to be build failures, but
445these have been fixed
446L<[perl #73630]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=73630>.
447
448=back
449
450=head1 Internal Changes
451
452=over 4
453
454=item *
455
456The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> have
457been merged. The implementation functions C<Perl_do_chop()> and
458C<Perl_do_chomp()>, never part of the public API, have been merged and moved to
459a static function in F<pp.c>. This shrinks the perl binary slightly, and should
460not affect any code outside the core (unless it is relying on the order of side
461effects when C<chomp> is passed a I<list> of values).
462
463=item *
464
465Some of the flags parameters to the uvuni_to_utf8_flags() and
466utf8n_to_uvuni() have changed. This is a result of Perl now allowing
467internal storage and manipulation of code points that are problematic
468in some situations. Hence, the default actions for these functions has
469been complemented to allow these code points. The new flags are
470documented in L<perlapi>. Code that requires the problematic code
471points to be rejected needs to change to use these flags. Some flag
472names are retained for backward source compatibility, though they do
473nothing, as they are now the default. However the flags
474C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and
475C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a
476fundamentally broken model of how the Unicode non-character code points
477should be handled, which is now described in
478L<perlunicode/Non-character code points>. See also L</Selected Bug Fixes>.
479
480=item *
481
482Certain shared flags in the C<pmop.op_pmflags> and C<regexp.extflags>
483structures have been removed. These are: C<Rxf_Pmf_LOCALE>,
484C<Rxf_Pmf_UNICODE>, and C<PMf_LOCALE>. Instead there are encodes and
485three static in-line functions for accessing the information:
486C<get_regex_charset()>, C<set_regex_charset()>, and C<get_regex_charset_name()>,
b6538e4f 487which are defined in the places where the original flags were.
d17f3dbc
JV
488
489=item *
490
491A new option has been added to C<pv_escape> to dump all characters above
492ASCII in hexadecimal. Before, one could get all characters as hexadecimal
493or the Latin1 non-ASCII as octal
494
d17f3dbc
JV
495=item *
496
497Generate pp_* prototypes in pp_proto.h, and remove pp.sym
498
499Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
500locations that relied on them.
501
502regen/opcode.pl now generates prototypes for the PP functions directly, into
503pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
504this, removing the only ordering dependency in the regen scripts. opcode.pl
505is now responsible for prototypes for pp_* functions. (embed.pl remains
506responsible for ck_* functions, reading from regen/opcodes)
507
508=back
509
510=head1 Selected Bug Fixes
511
512=over 4
513
514=item *
515
516The handling of Unicode non-characters has changed.
517Previously they were mostly considered illegal, except that only one of
518the 66 of them was known about in places. The Unicode standard
519considers them legal, but forbids the "open interchange" of them.
520This is part of the change to allow the internal use of any code point
521(see L</Core Enhancements>). Together, these changes resolve
522L<# 38722|https://rt.perl.org/rt3/Ticket/Display.html?id=38722>,
523L<# 51918|http://rt.perl.org/rt3/Ticket/Display.html?id=51918>,
524L<# 51936|http://rt.perl.org/rt3/Ticket/Display.html?id=51936>,
525L<# 63446|http://rt.perl.org/rt3/Ticket/Display.html?id=63446>
526
527=item *
528
529Sometimes magic (ties, tainted, etc.) attached to variables could cause an
530object to last longer than it should, or cause a crash if a tied variable
531were freed from within a tie method. These have been fixed
532L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
533
534=item *
535
536Most I/O functions were not warning for unopened handles unless the
537'closed' and 'unopened' warnings categories were both enabled. Now only
538C<use warnings 'unopened'> is necessary to trigger these warnings (as was
539always meant to be the case.
540
541=item *
542
543C<< E<lt>exprE<gt> >> always respects overloading now if the expression is
544overloaded.
545
546Due to the way that 'E<lt>E<gt> as glob' was parsed differently from
547'E<lt>E<gt> as filehandle' from 5.6 onwards, something like C<< E<lt>$foo[0]E<gt> >> did
548not handle overloading, even if C<$foo[0]> was an overloaded object. This
549was contrary to the documentation for overload, and meant that C<< E<lt>E<gt> >>
550could not be used as a general overloaded iterator operator.
551
552=item *
553
554Destructors on objects were not called during global destruction on objects
555that were not referenced by any scalars. This could happen if an array
556element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
557blessed variable (C<bless \my @a; sub foo { @a }>).
558
559Now there is an extra pass during global destruction to fire destructors on
560any objects that might be left after the usual passes that check for
561objects referenced by scalars
562L<[perl #36347]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=36347>.
563
564=item *
565
566A long standing bug has now been fully fixed (partial fixes came in
567earlier releases), in which some Latin-1 non-ASCII characters on
568ASCII-platforms would match both a character class and its complement,
569such as U+00E2 being both in C<\w> and C<\W>, depending on the
570UTF-8-ness of the regular expression pattern and target string.
571Fixing this did expose some bugs in various modules and tests that
572relied on the previous behavior of C<[[:alpha:]]> not ever matching
573U+00FF, "LATIN SMALL LETTER Y WITH DIAERESIS", even when it should, in
574Unicode mode; now it does match when appropriate.
575L<[perl #60156]|http://rt.perl.org/rt3/Ticket/Display.html?id=60156>.
576
577=back
578
579=head1 Known Problems
580
581=over 4
582
583=item *
584
585The fix for [perl #81230] causes test failures for C<Tk> version 804.029.
586This is still being investigated.
587
588=back
589
590=head1 Acknowledgements
591
592Perl 5.13.9 represents approximately one month of development since
593Perl 5.13.8 and contains approximately 48000 lines of changes across
594809 files from 35 authors and committers:
595
596Abigail, Ævar Arnfjörð Bjarmason, brian d foy, Chris 'BinGOs' Williams,
597Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father
598Chrysostomos, Florian Ragwitz, Gerard Goossen, H.Merijn Brand, Jan
599Dubois, Jerry D. Hedden, Jesse Vincent, John Peacock, Karl Williamson,
600Leon Timmermans, Michael Parker, Michael Stevens, Nicholas Clark,
601Nuno Carvalho, Paul "LeoNerd" Evans, Peter J. Acklam, Peter Martini,
602Rainer Tammer, Reini Urban, Renee Baecker, Ricardo Signes, Robin Barker,
603Tony Cook, Vadim Konovalov, Vincent Pit, Zefram, and Zsbán Ambrus.
604
605Many of the changes included in this version originated in the CPAN
606modules included in Perl's core. We're grateful to the entire CPAN
607community for helping Perl to flourish.
608
609=head1 Reporting Bugs
610
611If you find what you think is a bug, you might check the articles
612recently posted to the comp.lang.perl.misc newsgroup and the perl
613bug database at http://rt.perl.org/perlbug/ . There may also be
614information at http://www.perl.org/ , the Perl Home Page.
615
616If you believe you have an unreported bug, please run the L<perlbug>
617program included with your release. Be sure to trim your bug down
618to a tiny but sufficient test case. Your bug report, along with the
619output of C<perl -V>, will be sent off to perlbug@perl.org to be
620analysed by the Perl porting team.
621
622If the bug you are reporting has security implications, which make it
623inappropriate to send to a publicly archived mailing list, then please send
624it to perl5-security-report@perl.org. This points to a closed subscription
01c8ed49
FC
625unarchived mailing list, which includes
626all the core committers, who will be able
d17f3dbc
JV
627to help assess the impact of issues, figure out a resolution, and help
628co-ordinate the release of patches to mitigate or fix the problem across all
629platforms on which Perl is supported. Please only use this address for
630security issues in the Perl core, not for modules independently
631distributed on CPAN.
632
633=head1 SEE ALSO
634
635The F<Changes> file for an explanation of how to view exhaustive details
636on what changed.
637
638The F<INSTALL> file for how to build Perl.
639
640The F<README> file for general stuff.
641
642The F<Artistic> and F<Copying> files for copyright information.
643
644=cut