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