This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
skip the defined *+ and *- tests on miniperl
[perl5.git] / pod / perl5152delta.pod
CommitLineData
63ac71b9
RS
1=encoding utf8
2
3=for comment
4This has been completed up to perl-5.12.1
5
6=head1 NAME
7
f25d4e05 8perl5152delta - what is new for perl v5.15.2
63ac71b9
RS
9
10=head1 DESCRIPTION
11
12This document describes differences between the 5.15.1 release and
13the 5.15.2 release.
14
15If you are upgrading from an earlier release such as 5.15.0, first read
16L<perl5151delta>, which describes differences between 5.15.0 and
175.15.1.
18
19=head1 Core Enhancements
20
21=head2 Subroutines in the CORE namespace
22
23Many Perl keywords are now available as subroutines in the CORE namespace.
24Most of these cannot be called through references or via C<&foo> syntax
25yet, but must be called as barewords. In other words, you can now do
26this:
27
28 BEGIN { *entangle = \&CORE::tie }
29 entangle $variable, $package, @args;
30
31This currently works for overridable keywords other than C<dump> and the
32infix operators. Calling through references only works for functions that
33take no arguments (like C<wantarray>).
34
35Work is under way to allow more of these subroutines to be called through
36references.
37
38=head2 C<__FILE__()> Syntax
39
40The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
41with an empty pair of parentheses after them. This makes them parse the
42same way as C<time>, C<fork> and other built-in functions.
43
44=head1 Incompatible Changes
45
46=head2 C<UNIVERSAL::VERSION> now returns $VERSION
47
48C<UNIVERSAL::VERSION> now return whatever is in $VERSION, instead of
49returning $VERSION converted to a version object and then to a string.
50As a result, it no longer parses the version when called without arguments,
51so it no longer dies in that case for malformed versions. This allows
52custom version number parsers to use C<< ->VERSION >> to retrieve the
53version number, as was the case in Perl 5.8 [perl #95544].
54
55=head1 Modules and Pragmata
56
57=head2 Updated Modules and Pragmata
58
59=over 4
60
61=item *
62
63L<B> has been upgraded from version 1.30 to version 1.31
64
65The XS code has changed slightly, as it was too tightly coupled to
66the contents of the header F<embedvar.h>. Documentation in L<B::Terse>
67and L<B::Xref> has been improved, hence their versions have been increased.
68
69=item *
70
71L<CPAN> has been upgraded from version 1.9600 to version 1.9800
72
73=item *
74
75L<CPANPLUS> has been upgraded from version 0.9108 to version 0.9109
76
77Fixed support for v-strings and x.y.z versions with v5.8.4
78
79=item *
80
81L<CPAN::Meta> has been upgraded from version 2.110930_001 to version 2.112150
82
83Stringify any objects encountered during conversion.
84
85Clarified that file paths in the 'provides' section must be in
86Unix-style (i.e. forward slashes)
87
88=item *
89
90L<DB_File> has been upgraded from version 1.822 to version 1.824
91
92Will now croak if attempt to freeze/thaw DB_File object [RT #69985]
93
94=item *
95
96L<diagnostics> has been upgraded from version 1.23 to 1.24.
97
98It now supports the %u formatting code. Previously it was unable to find
99descriptions for messages whose entries in L<perldiag> included that code
100[perl #94988].
101
102=item *
103
104L<Encode> has been upgraded from version 2.43 to version 2.44
105
106Addressed 'decode_xs n-byte heap-overflow' security bug in Unicode.xs
107
108=item *
109
110L<ExtUtils::Install> has been upgraded from version 1.56 to version 1.57.
111
112There is no change to ExtUtils::Install other than the version number
113increase, but L<ExtUtils::Installed> has been upgraded from version 1.999_001
114to version 1.999002 and a new C<skip_cwd> attribute has been added.
115
116=item *
117
118L<ExtUtils::MakeMaker> has been upgraded from version 6.58 to version 6.59
119
120=item *
121
122L<ExtUtils::Manifest> has been upgraded from version 1.58 to version 1.60
123
124=item *
125
126L<ExtUtils::ParseXS> has been upgraded from 3.00_01 to 3.00_04.
127
128=item *
129
130L<IPC::Open3> has been upgraded from version 1.11 to 1.12.
131
132C<open3> with "-" for the program name works once more. This was broken in
133version 1.06 (and hence in Perl 5.14.0) [perl #95748].
134
135=item *
136
137L<Module::Build> has been upgraded from version 0.3800 to version 0.39_01.
138
139Pod to HTML internals changed to support revisions to Pod::Html in core.
140Also fixes some minor bugs. [rt.cpan.org #68585] [rt.cpan.org #67893]
141[rt.cpan.org #67008]
142
143=item *
144
145L<Module::CoreList> has been upgraded from version 2.54 to version 2.55
146
147=item *
148
149L<Module::Load> has been upgraded from version 0.18 to version 0.20
150
151=item *
152
153L<Module::Metadata> has been upgraded from version 1.000004 to version 1.000005
154
155Added C<new_from_handle()> method.
156
157=item *
158
159L<Params::Check> has been upgraded from version 0.28 to version 0.32
160
161=item *
162
163L<PerlIO::via> has been upgraded from version 0.11 to version 0.12.
164
165The only change is a correction in the documentation.
166
167=item *
168
169L<Term::ANSIColor> has been upgraded from version 3.00 to version 3.01
170
171Only interpret an initial array reference as a list of colors, not any initial
172reference, allowing the colored function to work properly on objects with
173stringification defined.
174
175=item *
176
177L<Unicode::Collate> has been upgraded from version 0.77 to version 0.78
178
179=item *
180
181L<Unicode::Normalize> has been upgraded from version 1.12 to version 1.13
182
183=back
184
185=head1 Documentation
186
187=head2 New Documentation
188
189=head3 L<perlexperiment>
190
191This document is intended to provide a list of experimental features in
192Perl. It is still a work in progress.
193
194=head2 Changes to Existing Documentation
195
196=head3 L<perlsub>
197
198=over 4
199
200=item *
201
202The ($;) prototype syntax, which has existed for rather a long time, is now
203documented in L<perlsub>. It allows a unary function to have the same
204precedence as a list operator.
205
206=back
207
208=head1 Diagnostics
209
210The following additions or changes have been made to diagnostic output,
211including warnings and fatal error messages. For the complete list of
212diagnostic messages, see L<perldiag>.
213
214=head2 New Diagnostics
215
216=head3 New Errors
217
218=over 4
219
220=item *
221
222L<&CORE::%s cannot be called directly|perldiag/"&CORE::%s cannot be called directly">
223
224(F) You tried to call a subroutine in the C<CORE::> namespace
225with C<&foo> syntax or through a reference. The subroutines
226in this package cannot yet be called that way, but must be
227called as barewords. Something like this will work:
228
229 BEGIN { *shove = \&CORE::push; }
230 shove @array, 1,2,3; # pushes on to @array
231
232=back
233
234=head1 Utility Changes
235
236=head3 L<perlivp>
237
238=over 4
239
240=item *
241
242Fixed a bug whereby other perls under the current directory could cause
243false positive failures.
244
245=item *
246
247Tests for .ph files have been removed, as these test have been optional since
2482005 and .ph files are no longer generated during installation.
249
250=back
251
252=head3 L<splain>
253
254See the entry for C<< diagnostics >> in L</Updated Modules and Pragmata>,
255above.
256
257=head1 Configuration and Compilation
258
259=over 4
260
261=item *
262
263F<makedef.pl> has been refactored. This should have no noticeable affect on
264any of the platforms that use it as part of their build (AIX, VMS, Win32).
265
266=item *
267
268C<useperlio> can no longer be disabled.
269
270=back
271
272=head1 Platform Support
273
274=over 4
275
276=item HP-UX PA-RISC/64 now supports gcc-4.x
277
278A fix to correct the socketsize now makes the test suite pass on HP-UX
279PA-RISC for 64bitall builds.
280
281=back
282
283=head1 Internal Changes
284
285=over 4
286
287=item *
288
289F<embedvar.h> has been simplified, and one level of macro indirection for
290PL_* variables has been removed for the default (non-multiplicity)
291configuration. PERLVAR*() macros now directly expand their arguments to
292tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>, with
293F<embedvar.h> defining a macro to map C<PL_Idefgv> to C<PL_defgv>. XS code
294which has unwarranted chumminess with the implementation may need updating.
295
296=item *
297
298A C<coreargs> opcode has been added, to be used by C<&CORE::foo> subs to sort
299out C<@_>.
300
301=item *
302
303An API has been added to explicitly choose whether or not to export XSUB
304symbols. More detail can be found in the comments for commit e64345f8.
305
306=back
307
308=head1 Selected Bug Fixes
309
310=over 4
311
312=item *
313
314Locking a subroutine (via C<lock &sub>) is no longer a compile-time error
315for regular subs. For lvalue subroutines, it no longer tries to return the
316sub as a scalar, resulting in strange side effects like C<ref \$_>
317returning "CODE" in some instances.
318
319C<lock &sub> is now a run-time error if L<threads::shared> is loaded (a
320no-op otherwise), but that may be rectified in a future version.
321
322=item *
323
324The prototypes of several built-in functions--C<getprotobynumber>, C<lock>,
325C<not> and C<select>--have been corrected, or at least are now closer to
326reality than before.
327
328=item *
329
330Most dereferencing operators (C<${}>, etc.) used to call C<FETCH> twice on
331a tied operand when doing a symbolic dereference (looking up a variable by
332name, which is not permitted under C<use strict 'refs'>). Only C<&{}> did
333not have this problem. This has been fixed.
334
335=item *
336
337A minor regression introduced in 5.15.0 has been fixed. Dereferencing a
338magical mortal (e.g., the return value of C<delete> on a tied hash element)
339explicitly returned from a subroutine called recursively was not calling
340C<FETCH>. This would affect code like C<@{ foo() }> where the C<foo> sub
341contains C<return delete $hash{elem}> and is calling itself.
342
343=item *
344
345A panic involving the combination of the regular expression modifiers
346C</aa> and the C<\b> escape sequence introduced in 5.14.0 has been
347fixed [perl #95964].
348
349=item *
350
351stat() would always return the inode number as an IV, even when the
352original was unsigned, or too large to fit in an IV. stat() now
353returns the inode number as the type that would best preserve the
354original value. [perl #84590]
355
356=item *
357
358The combination of the regular expression modifiers C</aa> and the C<\b>
359and C<\B> escape sequences did not work properly on UTF-8 encoded
360strings. All non-ASCII characters under C</aa> should be treated as
361non-word characters, but what was happening was that Unicode rules were
362used to determine wordness/non-wordness for non-ASCII characters. This
363is now fixed [perl #95968].
364
365=item *
366
367Infinite loops like C<1 while 1> used to stop C<strict 'subs'> mode from
368working for the rest of the block.t
369
370=item *
371
372The C<\h>, C<\H>, C<\v> and C<\V> regular expression metacharacters used to
373cause a panic error message when attempting to match at the end of the
374string [perl #96354].
375
376=item *
377
378For list assignments like C<($a,$b) = ($b,$a)>, Perl has to make a copy of
379the items on the right-hand side before assignment them to the left. For
380efficiency's sake, it assigns the values on the right straight to the items
381on the left no variable is mentioned on both sides, as in
382C<($a,$b) = ($c,$d)>. The logic for determining when it can cheat was
383faulty, in that C<&&> and C<||> on the right-hand side could fool it. So
384C<($a,$b) = $some_true_value && ($b,$a)> would end up assigning the value
385of C<$b> to both scalars.
386
387=item *
388
389Perl no longer tries to apply lvalue context to the string in
390C<("string", $variable) ||= 1> (which used to be an error). Since the
391left-hand side of C<||=> is evaluated in scalar context, that's a scalar
392comma operator, which gives all but the last item void context. There is
393no such thing as void lvalue context, so it was a mistake for Perl to try
394to force it [perl #96942].
395
396=item *
397
398Every subroutine has a filename associated with it, that the debugger uses.
399The one associated with constant subroutines used to be misallocated when
400cloned under threads. Consequently, debugging threaded applications could
401result in memory corruption [perl #96126].
402
403=item *
404
405C<caller> no longer leaks memory when called from the DB package if
406C<@DB::args> was assigned to after the first call to C<caller>. L<Carp>
407was triggering this bug [perl #97010].
408
409=back
410
411=head1 Acknowledgements
412
413Perl 5.15.2 represents approximately 2 months of development since Perl
4145.15.1 and contains approximately 17,000 lines of changes across 330
415files from 35 authors.
416
417Perl continues to flourish into its third decade thanks to a vibrant
418community of users and developers. The following people are known to
419have contributed the improvements that became Perl 5.15.2:
420
421Abigail, Andreas König, brian d foy, Brian Greenfield, Chas. Owens,
422Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell,
423Eric Brine, Father Chrysostomos, Florian Ragwitz, Gerard Goossen,
424H.Merijn Brand, Jesse Vincent, John Peacock, Karl Williamson, Karthik
425Rajagopalan, Keith Thompson, Kevin Ryde, Matthew Horsfall, Mike
426Sheldrake, Nicholas Clark, Niko Tyni, Reini Urban, Ricardo Signes,
427Salvador Fandiño, Shlomi Fish, Spiros Denaxas, Steffen Müller, Stephen
428Oberholtzer, Steve Hay, Tony Cook, Vincent Pit, Zefram.
429
430The list above is almost certainly incomplete as it is automatically
431generated from version control history. In particular, it does not
432include the names of the (very much appreciated) contributors who
433reported issues to the Perl bug tracker.
434
435Many of the changes included in this version originated in the CPAN
436modules included in Perl's core. We're grateful to the entire CPAN
437community for helping Perl to flourish.
438
439For a more complete list of all of Perl's historical contributors,
440please see the F<AUTHORS> file in the Perl source distribution.
441
442=head1 Reporting Bugs
443
444If you find what you think is a bug, you might check the articles
445recently posted to the comp.lang.perl.misc newsgroup and the perl
446bug database at http://rt.perl.org/perlbug/ . There may also be
447information at http://www.perl.org/ , the Perl Home Page.
448
449If you believe you have an unreported bug, please run the L<perlbug>
450program included with your release. Be sure to trim your bug down
451to a tiny but sufficient test case. Your bug report, along with the
452output of C<perl -V>, will be sent off to perlbug@perl.org to be
453analysed by the Perl porting team.
454
455If the bug you are reporting has security implications, which make it
456inappropriate to send to a publicly archived mailing list, then please send
457it to perl5-security-report@perl.org. This points to a closed subscription
458unarchived mailing list, which includes
459all the core committers, who will be able
460to help assess the impact of issues, figure out a resolution, and help
461co-ordinate the release of patches to mitigate or fix the problem across all
462platforms on which Perl is supported. Please only use this address for
463security issues in the Perl core, not for modules independently
464distributed on CPAN.
465
466=head1 SEE ALSO
467
468The F<Changes> file for an explanation of how to view exhaustive details
469on what changed.
470
471The F<INSTALL> file for how to build Perl.
472
473The F<README> file for general stuff.
474
475The F<Artistic> and F<Copying> files for copyright information.
476
477=cut