Commit | Line | Data |
---|---|---|
4c793fe3 FR |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
2d65b149 | 5 | perl5137delta - what is new for perl v5.13.7 |
a12cf05f | 6 | |
8f97a47a | 7 | =head1 DESCRIPTION |
fb121860 | 8 | |
8f97a47a TM |
9 | This document describes differences between the 5.13.6 release and |
10 | the 5.13.7 release. | |
eb32ee41 | 11 | |
8f97a47a TM |
12 | If you are upgrading from an earlier release such as 5.13.5, first read |
13 | L<perl5136delta>, which describes differences between 5.13.5 and | |
14 | 5.13.6. | |
eb32ee41 | 15 | |
8f97a47a | 16 | =head1 Core Enhancements |
5e26bbbe | 17 | |
c035a075 DG |
18 | =head2 Single term prototype |
19 | ||
20 | The C<+> prototype is a special alternative to C<$> that will act like | |
21 | C<\[@%]> when given a literal array or hash variable, but will otherwise | |
22 | force scalar context on the argument. This is useful for functions which | |
23 | should accept either a literal array or an array reference as the argument: | |
24 | ||
25 | sub smartpush (+@) { | |
26 | my $aref = shift; | |
27 | die "Not an array or arrayref" unless ref $aref eq 'ARRAY'; | |
28 | push @$aref, @_; | |
29 | } | |
30 | ||
31 | When using the C<+> prototype, your function must check that the argument | |
32 | is of an acceptable type. | |
33 | ||
b7bd32cc FC |
34 | =head2 C<use re '/flags';> |
35 | ||
36 | The C<re> pragma now has the ability to turn on regular expression flags | |
37 | till the end of the lexical scope: | |
38 | ||
39 | use re '/x'; | |
40 | "foo" =~ / (.+) /; # /x implied | |
41 | ||
64fbc533 | 42 | See L<re/"'/flags' mode"> for details. |
b7bd32cc | 43 | |
a5e71717 FC |
44 | =head2 Statement labels can appear in more places |
45 | ||
46 | Statement labels can now occur before any type of statement or declaration, | |
47 | such as C<package>. | |
48 | ||
9b7c43ba KW |
49 | =head2 C<use feature "unicode_strings"> now applies to more regex matching |
50 | ||
51 | Another chunk of the L<perlunicode/The "Unicode Bug"> is fixed in this | |
52 | release. Now, regular expressions compiled within the scope of the | |
53 | "unicode_strings" feature (or under the "u" regex modifier (specifiable | |
54 | currently only with infix notation C<(?u:...)> or via C<use re '/u'>) | |
55 | will match the same whether or not the target string is encoded in utf8, | |
56 | with regard to C<[[:posix:]]> character classes | |
57 | ||
58 | Work is underway to add the case sensitive matching to the control of | |
59 | this feature, but was not complete in time for this dot release. | |
60 | ||
cba5a3b0 DG |
61 | =head2 Array and hash container functions accept references |
62 | ||
63 | All built-in functions that operate directly on array or hash | |
64 | containers now also accept hard references to arrays or hashes: | |
65 | ||
66 | |----------------------------+---------------------------| | |
67 | | Traditional syntax | Terse syntax | | |
68 | |----------------------------+---------------------------| | |
69 | | push @$arrayref, @stuff | push $arrayref, @stuff | | |
70 | | unshift @$arrayref, @stuff | unshift $arrayref, @stuff | | |
71 | | pop @$arrayref | pop $arrayref | | |
72 | | shift @$arrayref | shift $arrayref | | |
73 | | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 | | |
74 | | keys %$hashref | keys $hashref | | |
75 | | keys @$arrayref | keys $arrayref | | |
76 | | values %$hashref | values $hashref | | |
77 | | values @$arrayref | values $arrayref | | |
78 | | ($k,$v) = each %$hashref | ($k,$v) = each $hashref | | |
79 | | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref | | |
80 | |----------------------------+---------------------------| | |
81 | ||
82 | This allows these built-in functions to act on long dereferencing chains | |
83 | or on the return value of subroutines without needing to wrap them in | |
84 | C<@{}> or C<%{}>: | |
85 | ||
86 | push @{$obj->tags}, $new_tag; # old way | |
87 | push $obj->tags, $new_tag; # new way | |
88 | ||
89 | for ( keys %{$hoh->{genres}{artists}} ) {...} # old way | |
90 | for ( keys $hoh->{genres}{artists} ) {...} # new way | |
91 | ||
92 | For C<push>, C<unshift> and C<splice>, the reference will auto-vivify | |
93 | if it is not defined, just as if it were wrapped with C<@{}>. | |
94 | ||
95 | Calling C<keys> or C<values> directly on a reference gives a substantial | |
96 | performance improvement over explicit dereferencing. | |
97 | ||
98 | For C<keys>, C<values>, C<each>, when overloaded dereferencing is | |
99 | present, the overloaded dereference is used instead of dereferencing the | |
100 | underlying reftype. Warnings are issued about assumptions made in the | |
101 | following three ambiguous cases: | |
102 | ||
103 | (a) If both %{} and @{} overloading exists, %{} is used | |
104 | (b) If %{} overloading exists on a blessed arrayref, %{} is used | |
105 | (c) If @{} overloading exists on a blessed hashref, @{} is used | |
106 | ||
15bc3b4f FC |
107 | =head2 y///r |
108 | ||
109 | The C</r> flag, which was added to C<s///> in 5.13.2, has been extended to | |
110 | the C<y///> operator. | |
111 | ||
112 | It causes it to perform the substitution on a I<copy> of its operand, | |
113 | returning that copy instead of a character count. | |
114 | ||
d29ae9fc FR |
115 | =head2 New global variable C<${^GLOBAL_PHASE}> |
116 | ||
117 | A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow | |
118 | introspection of the current phase of the perl interpreter. It's explained in | |
119 | detail in L<perlvar/"${^GLOBAL_PHASE}"> and | |
120 | L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">. | |
121 | ||
3ffed8c2 | 122 | =head2 Unicode Version 6.0 is now supported (mostly) |
bd84d130 | 123 | |
484741e1 KW |
124 | Perl comes with the Unicode 6.0 data base updated with |
125 | L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>, | |
126 | with one exception noted below. | |
bd84d130 KW |
127 | See L<http://unicode.org/versions/Unicode6.0.0> for details on the new |
128 | release. Perl does not support any Unicode provisional properties, | |
129 | including the new ones for this release, but their database files are | |
130 | packaged with Perl. | |
131 | ||
3ffed8c2 KW |
132 | Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514, |
133 | which is a symbol that looks like a bell, and used in Japanese cell | |
134 | phones. This conflicts with the long-standing Perl usage of having | |
135 | C<BELL> mean the ASCII C<BEL> character, U+0007. In Perl 5.14, | |
136 | C<\N{BELL}> will continue to mean U+0007, but its use will generate a | |
137 | deprecated warning message, unless such warnings are turned off. The | |
138 | new name for U+0007 in Perl will be C<ALERT>, which corresponds nicely | |
139 | with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> will | |
140 | mean U+0007, with no warning given. The character at U+1F514 will not | |
141 | have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan | |
142 | is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code | |
143 | that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>, | |
144 | C<\N{BEL}>, or C<"\a"> instead. | |
145 | ||
74100276 FC |
146 | =head2 Improved support for custom OPs |
147 | ||
148 | Custom ops can now be registered with the new C<custom_op_register> C | |
149 | function and the C<XOP> structure. This will make it easier to add new | |
150 | properties of custom ops in the future. Two new properties have been added | |
151 | already, C<xop_class> and C<xop_peep>. | |
152 | ||
153 | C<xop_class> is one of the OA_*OP constants, and allows L<B> and other | |
154 | introspection mechanisms to work with custom ops that aren't BASEOPs. | |
155 | C<xop_peep> is a pointer to a function that will be called for ops of this | |
156 | type from C<Perl_rpeep>. | |
157 | ||
158 | See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more | |
159 | detail. | |
160 | ||
161 | The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still | |
162 | supported but discouraged. | |
163 | ||
4c793fe3 FR |
164 | =head1 Incompatible Changes |
165 | ||
a638ba6f FC |
166 | =head2 Dereferencing typeglobs |
167 | ||
168 | If you assign a typeglob to a scalar variable: | |
169 | ||
170 | $glob = *foo; | |
171 | ||
172 | the glob that is copied to C<$glob> is marked with a special flag | |
173 | indicating that the glob is just a copy. This allows subsequent assignments | |
174 | to C<$glob> to overwrite the glob. The original glob, however, is | |
175 | immutable. | |
176 | ||
177 | Many Perl operators did not distinguish between these two types of globs. | |
178 | This would result in strange behaviour in edge cases: C<untie $scalar> | |
179 | would do nothing if the last thing assigned to the scalar was a glob | |
180 | (because it treated it as C<untie *$scalar>, which unties a handle). | |
0b6a3b5a | 181 | Assignment to a glob slot (e.g., C<(*$glob) = \@some_array>) would simply |
a638ba6f FC |
182 | assign C<\@some_array> to C<$glob>. |
183 | ||
184 | To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms) | |
185 | has been modified to make a new immutable glob if its operand is a glob | |
186 | copy. Various operators that make a distinction between globs and scalars | |
187 | have been modified to treat only immutable globs as globs. | |
188 | ||
189 | This causes an incompatible change in code that assigns a glob to the | |
190 | return value of C<*{}> when that operator was passed a glob copy. Take the | |
191 | following code, for instance: | |
192 | ||
193 | $glob = *foo; | |
194 | *$glob = *bar; | |
195 | ||
196 | The C<*$glob> on the second line returns a new immutable glob. That new | |
15bc3b4f FC |
197 | glob is made an alias to C<*bar>. Then it is discarded. So the second |
198 | assignment has no effect. | |
a638ba6f | 199 | |
f869c585 FC |
200 | It also means that C<tie $handle> will now tie C<$handle> as a scalar, even |
201 | if it has had a glob assigned to it. | |
202 | ||
a638ba6f FC |
203 | The upside to this incompatible change is that bugs |
204 | L<[perl #77496]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77496>, | |
205 | L<[perl #77502]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77502>, | |
206 | L<[perl #77508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77508>, | |
207 | L<[perl #77688]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77688>, | |
208 | and | |
209 | L<[perl #77812]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77812>, | |
210 | and maybe others, too, have been fixed. | |
211 | ||
0b6a3b5a FC |
212 | See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even |
213 | more detail. | |
a638ba6f | 214 | |
e437e8d7 FC |
215 | =head2 Clearing stashes |
216 | ||
217 | Stash list assignment C<%foo:: = ()> used to make the stash anonymous | |
218 | temporarily while it was being emptied. Consequently, any of its | |
219 | subroutines referenced elsewhere would become anonymous (showing up as | |
220 | "(unknown)" in C<caller>). Now they retain their package names, such that | |
221 | C<caller> will return the original sub name if there is still a reference | |
a9fd1744 FC |
222 | to its typeglob, or "foo::__ANON__" otherwise |
223 | L<[perl #79208]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79208>. | |
e437e8d7 | 224 | |
8f97a47a | 225 | =head1 Deprecations |
6904a83f | 226 | |
3ffed8c2 KW |
227 | =head2 C<\N{BELL}> is deprecated |
228 | ||
229 | This is because Unicode is using that name for a different character. | |
230 | See L</Unicode Version 6.0 is now supported (mostly)> for more | |
231 | explanation. | |
232 | ||
4c793fe3 FR |
233 | =head1 Performance Enhancements |
234 | ||
8f97a47a | 235 | =over 4 |
e2babdfb | 236 | |
b141c43c FR |
237 | =item * |
238 | ||
6d07abef CBW |
239 | When an object has many weak references to it, freeing that object |
240 | can under some some circumstances take O(N^2) time to free (where N is the | |
241 | number of references). The number of circumstances has been reduced. | |
242 | L<[perl #75254]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75254>. | |
b141c43c | 243 | |
4c793fe3 FR |
244 | =back |
245 | ||
246 | =head1 Modules and Pragmata | |
247 | ||
8f97a47a | 248 | =head2 New Modules and Pragmata |
25e68b8b | 249 | |
8f97a47a | 250 | =over 4 |
463da0ac CBW |
251 | |
252 | =item * | |
253 | ||
028d3bfa | 254 | The following modules were added by the C<Unicode::Collate> |
b5d9a953 | 255 | upgrade from 0.63 to 0.67. See below for details. |
028d3bfa | 256 | |
584e761d | 257 | C<Unicode::Collate::CJK::Big5> |
028d3bfa CBW |
258 | |
259 | C<Unicode::Collate::CJK::GB2312> | |
260 | ||
584e761d CBW |
261 | C<Unicode::Collate::CJK::JISX0208> |
262 | ||
263 | C<Unicode::Collate::CJK::Korean> | |
028d3bfa CBW |
264 | |
265 | C<Unicode::Collate::CJK::Pinyin> | |
266 | ||
267 | C<Unicode::Collate::CJK::Stroke> | |
6481ebaf | 268 | |
8f97a47a | 269 | =back |
6481ebaf | 270 | |
8f97a47a | 271 | =head2 Updated Modules and Pragmata |
6481ebaf | 272 | |
8f97a47a | 273 | =over 4 |
ac4c9720 CBW |
274 | |
275 | =item * | |
276 | ||
9f1eb87f CBW |
277 | C<Archive::Extract> has been upgraded from 0.44 to 0.46 |
278 | ||
279 | Resolves an issue with NetBSD-current and its new unzip | |
280 | executable. | |
281 | ||
282 | =item * | |
283 | ||
5d8924b5 | 284 | C<Archive::Tar> has been upgraded from 1.68 to 1.72 |
deabda19 CBW |
285 | |
286 | This adds the ptargrep utility for using regular expressions against | |
287 | the contents of files in a tar archive. | |
288 | ||
289 | =item * | |
290 | ||
8770f09e | 291 | C<B> has been upgraded from 1.24 to 1.26. |
a5e71717 | 292 | |
ca60ecf2 FC |
293 | It no longer crashes when taking apart a C<y///> containing characters |
294 | outside the octet range or compiled in a C<use utf8> scope. | |
295 | ||
cd094c23 NC |
296 | The size of the shared object has been reduced by about 40%, with no |
297 | reduction in functionality. | |
298 | ||
a5e71717 FC |
299 | =item * |
300 | ||
b293762b | 301 | C<B::Deparse> has been upgraded from 0.99 to 1.01. |
b7bd32cc FC |
302 | |
303 | It fixes deparsing of C<our> followed by a variable with funny characters | |
304 | (as permitted under the C<utf8> pragma) | |
305 | L<[perl #33752]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=33752>. | |
306 | ||
307 | =item * | |
308 | ||
84601d63 CBW |
309 | C<CGI> has been upgraded from 3.49 to 3.50 |
310 | ||
311 | This provides the following security fixes: the MIME boundary in | |
312 | multipart_init is now random and improvements to the handling of | |
313 | newlines embedded in header values. | |
314 | ||
315 | The documentation for param_fetch() has been corrected and clarified. | |
316 | ||
317 | =item * | |
318 | ||
07be2ace CBW |
319 | C<CPAN> has been upgraded from 1.94_61 to 1.94_62 |
320 | ||
321 | =item * | |
322 | ||
59af3f66 CBW |
323 | C<CPANPLUS> has been upgraded from 0.9007 to 0.9010 |
324 | ||
325 | Fixes for the SQLite source engine and resolving of issues with the | |
326 | testsuite when run under local::lib and/or cpanminus | |
327 | ||
328 | =item * | |
329 | ||
f5c34353 CBW |
330 | C<CPANPLUS::Dist::Build> has been upgraded from 0.48 to 0.50 |
331 | ||
332 | =item * | |
333 | ||
b73d44b7 | 334 | C<Data::Dumper> has been upgraded from 2.129 to 2.130_01. |
ca60ecf2 FC |
335 | |
336 | =item * | |
337 | ||
9e2ac5d4 FC |
338 | C<DynaLoader> has been upgraded from 1.10 to 1.11. |
339 | ||
340 | It fixes a buffer overflow when passed a very long file name. | |
341 | ||
342 | =item * | |
343 | ||
48ea5431 FC |
344 | C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23. |
345 | ||
cd094c23 NC |
346 | The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs> |
347 | can now C<croak> for missing constants, or generate a complete C<AUTOLOAD> | |
348 | subroutine in XS, allowing simplification of many modules that use it. | |
349 | (C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, C<Socket>) | |
350 | ||
351 | C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all | |
352 | constants onto the package's C{@EXPORT_OK}. This has been used to replace | |
353 | less space-efficient code in C<B>, helping considerably shrink the size of its | |
354 | shared object. | |
355 | ||
48ea5431 FC |
356 | =item * |
357 | ||
358 | C<Fcntl> has been upgraded from 1.09 to 1.10. | |
359 | ||
360 | =item * | |
361 | ||
6d3bcdd8 | 362 | C<File::Fetch> has been upgraded from 0.24 to 0.28 |
0df024e2 CBW |
363 | |
364 | C<HTTP::Lite> is now supported for 'http' scheme. | |
365 | ||
6d3bcdd8 CBW |
366 | The C<fetch> utility is supported on FreeBSD, NetBSD and |
367 | Dragonfly BSD for the C<http> and C<ftp> schemes. | |
368 | ||
0df024e2 CBW |
369 | =item * |
370 | ||
48ea5431 FC |
371 | C<File::Glob> has been upgraded from 1.09 to 1.10. |
372 | ||
373 | =item * | |
374 | ||
ca60ecf2 FC |
375 | C<File::stat> has been upgraded from 1.03 to 1.04. |
376 | ||
377 | The C<-x> and C<-X> file test operators now work correctly under the root | |
378 | user. | |
379 | ||
380 | =item * | |
381 | ||
c39f7439 FC |
382 | C<GDBM_File> has been upgraded from 1.11 to 1.12. |
383 | ||
384 | This fixes a memory leak when DBM filters are used. | |
385 | ||
386 | =item * | |
387 | ||
48ea5431 FC |
388 | C<Hash::Util> has been upgraded from 0.09 to 0.10. |
389 | ||
b293762b FC |
390 | =item * |
391 | ||
392 | C<Hash::Util::FieldHash> has been upgraded from 1.05 to 1.06. | |
48ea5431 FC |
393 | |
394 | =item * | |
395 | ||
396 | C<I18N::Langinfo> has been upgraded from 0.06 to 0.07. | |
397 | ||
398 | =item * | |
399 | ||
b22271be FR |
400 | C<Locale::Maketext> has been upgraded from 1.16 to 1.17. |
401 | ||
402 | =item * | |
403 | ||
b73d44b7 CBW |
404 | C<Math::BigInt> has been upgraded from 1.97 to 1.99_01. |
405 | ||
406 | =item * | |
407 | ||
408 | C<Math::BigRat> has been upgraded from 0.26 to 0.26_01 | |
e1be28b4 TR |
409 | |
410 | =item * | |
411 | ||
b73d44b7 | 412 | C<Math::BigInt::FastCalc> has been upgraded from 0.22 to 0.24_01. |
b293762b FC |
413 | |
414 | =item * | |
415 | ||
46787c0e CBW |
416 | C<MIME::Base64> has been upgraded from 3.09 to 3.10 |
417 | ||
418 | Includes new functions to calculate the length of encoded and decoded | |
419 | base64 strings. | |
420 | ||
421 | =item * | |
422 | ||
8ff01ef0 FC |
423 | C<mro> has been upgraded from 1.04 to 1.05. |
424 | ||
425 | =item * | |
426 | ||
c39f7439 FC |
427 | C<NDBM_File> has been upgraded from 1.09 to 1.10. |
428 | ||
429 | This fixes a memory leak when DBM filters are used. | |
430 | ||
431 | =item * | |
432 | ||
433 | C<ODBM_File> has been upgraded from 1.08 to 1.09. | |
434 | ||
435 | This fixes a memory leak when DBM filters are used. | |
436 | ||
437 | =item * | |
438 | ||
ca60ecf2 FC |
439 | C<Opcode> has been upgraded from 1.16 to 1.17. |
440 | ||
441 | =item * | |
442 | ||
a9aeb2f1 CBW |
443 | C<parent> has been upgraded from 0.223 to 0.224 |
444 | ||
445 | =item * | |
446 | ||
40fcdb56 CBW |
447 | C<Pod::Simple> has been upgraded from 3.14 to 3.15 |
448 | ||
449 | Includes various fixes to C<HTML> and C<XHTML> handling. | |
450 | ||
451 | =item * | |
452 | ||
48ea5431 FC |
453 | C<POSIX> has been upgraded from 1.21 to 1.22. |
454 | ||
455 | =item * | |
456 | ||
b7bd32cc FC |
457 | C<re> has been upgraded from 0.13 to 0.14, for the sake of the new |
458 | C<use re "/flags"> pragma. | |
dfa4c013 | 459 | |
48ea5431 FC |
460 | =item * |
461 | ||
8ff01ef0 FC |
462 | C<Safe> has been upgraded from 2.28 to 2.29. |
463 | ||
464 | It adds C<&version::vxs::VCMP> to the default share. | |
465 | ||
466 | =item * | |
467 | ||
48ea5431 FC |
468 | C<SDBM_File> has been upgraded from 1.07 to 1.08. |
469 | ||
470 | =item * | |
471 | ||
a5e71717 FC |
472 | C<SelfLoader> has been upgraded from 1.17 to 1.18. |
473 | ||
474 | It now works in taint mode | |
475 | L<[perl #72062]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72062>. | |
476 | ||
477 | =item * | |
478 | ||
48ea5431 FC |
479 | C<Socket> has been upgraded from 1.90 to 1.91. |
480 | ||
a5e71717 FC |
481 | =item * |
482 | ||
fd0eba19 CBW |
483 | C<Storable> has been upgraded from 2.22 to 2.24 |
484 | ||
485 | Includes performance improvement for overloaded classes. | |
486 | ||
487 | =item * | |
488 | ||
a5e71717 FC |
489 | C<Sys::Hostname> has been upgraded from 1.13 to 1.14. |
490 | ||
539ce3d8 CBW |
491 | =item * |
492 | ||
b5d9a953 | 493 | C<Unicode::Collate> has been upgraded from 0.63 to 0.67 |
028d3bfa | 494 | |
584e761d | 495 | This release newly adds locales C<ja> C<ko> and C<zh> and its variants |
028d3bfa CBW |
496 | ( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ). |
497 | ||
b5d9a953 CBW |
498 | Supported UCA_Version 22 for Unicode 6.0.0. |
499 | ||
028d3bfa | 500 | The following modules have been added: |
539ce3d8 | 501 | |
028d3bfa CBW |
502 | C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes |
503 | tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering. | |
504 | ||
505 | C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes | |
506 | tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering. | |
507 | ||
584e761d CBW |
508 | C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji |
509 | (CJK Unified Ideographs) in the JIS X 0208 order. | |
510 | ||
511 | C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs | |
512 | in the order of CLDR's Korean ordering. | |
513 | ||
028d3bfa CBW |
514 | C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes |
515 | tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering. | |
516 | ||
517 | C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes | |
518 | tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering. | |
519 | ||
8f97a47a | 520 | =back |
dfa4c013 | 521 | |
8f97a47a | 522 | =head1 Documentation |
918184d1 | 523 | |
570c3caa | 524 | L<perlvar> reorders the variables and groups them by topic. Each variable |
525 | introduced after Perl 5.000 notes the first version in which it is | |
526 | available. L<perlvar> also has a new section for deprecated variables to | |
527 | note when they were removed. | |
528 | ||
8f97a47a | 529 | =head2 New Documentation |
dca41e57 | 530 | |
b73d44b7 | 531 | =head3 L<perlpodstyle> |
dca41e57 | 532 | |
b73d44b7 CBW |
533 | New style guide for POD documentation, |
534 | split mostly from the NOTES section of the pod2man man page. | |
c9a84c8b | 535 | |
b73d44b7 | 536 | ( This was added to C<v5.13.6> but was not documented with that release ). |
4c793fe3 | 537 | |
ee0887a9 | 538 | =head2 Changes to Existing Documentation |
fc1418b7 | 539 | |
7eb82171 DG |
540 | =over |
541 | ||
48ea5431 FC |
542 | =item * |
543 | ||
a5e71717 | 544 | Array and hash slices in scalar context are now documented in L<perldata>. |
48ea5431 | 545 | |
b293762b FC |
546 | =item * |
547 | ||
548 | L<perlform> and L<perllocale> have been corrected to state that | |
549 | C<use locale> affects formats. | |
550 | ||
7eb82171 DG |
551 | =back |
552 | ||
4c793fe3 FR |
553 | =head1 Diagnostics |
554 | ||
8f97a47a | 555 | =head2 New Diagnostics |
4c793fe3 | 556 | |
dc08898c FC |
557 | =over 4 |
558 | ||
559 | =item * | |
560 | ||
15bc3b4f FC |
561 | "Using !~ with %s doesn't make sense": This message was actually added in |
562 | 5.13.2, but was omitted from perldelta. It now applies also to the C<y///> | |
563 | operator, and has been documented. | |
dc08898c FC |
564 | |
565 | =back | |
566 | ||
8f97a47a | 567 | =head1 Utility Changes |
810f3b7c | 568 | |
deabda19 | 569 | =head3 L<ptargrep> |
85318b69 | 570 | |
ee0887a9 | 571 | =over 4 |
80b6a949 | 572 | |
e2babdfb FR |
573 | =item * |
574 | ||
deabda19 CBW |
575 | L<ptargrep> is a utility to apply pattern matching to the contents of files |
576 | in a tar archive. It comes with C<Archive::Tar>. | |
9ae8c3d9 | 577 | |
ee0887a9 | 578 | =back |
e2babdfb | 579 | |
8f97a47a | 580 | =head1 Testing |
5a9a79a4 | 581 | |
8f97a47a | 582 | =over 4 |
a7e93501 FC |
583 | |
584 | =item * | |
585 | ||
a9fd1744 FC |
586 | The new F<t/mro/isa_aliases.t> has been added, which tests that |
587 | C<*Foo::ISA = *Bar::ISA> works properly. | |
588 | ||
589 | =item * | |
590 | ||
15bc3b4f FC |
591 | F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible |
592 | at the Perl level via C<mro::get_isarev>) is updated properly. | |
593 | ||
a9fd1744 | 594 | =item * |
15bc3b4f FC |
595 | |
596 | F<t/run/switchd-78586.t> has been added, which tests that | |
597 | L<[perl #78586]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78586> | |
36b9bdc9 | 598 | has been fixed (related to line numbers in the debugger). |
a7e93501 | 599 | |
8f97a47a | 600 | =back |
a7e93501 | 601 | |
8f97a47a | 602 | =head1 Platform Support |
a7e93501 | 603 | |
8f97a47a | 604 | =head2 Platform-Specific Notes |
be1cc451 | 605 | |
8f97a47a | 606 | =over 4 |
b20c4ee1 | 607 | |
b293762b | 608 | =item Windows |
afa74577 | 609 | |
b293762b FC |
610 | Directory handles are now properly cloned when threads are created. In perl |
611 | 5.13.6, child threads simply stopped inheriting directory handles. In | |
612 | previous versions, threads would share handles, resulting in crashes. | |
afa74577 | 613 | |
ffc8a9ad SH |
614 | Support for building with Visual C++ 2010 is now underway, but is not yet |
615 | complete. See F<README.win32> for more details. | |
360f7568 | 616 | |
cd67cda5 CB |
617 | =item VMS |
618 | ||
b2df7661 | 619 | Record-oriented files (record format variable or variable with fixed control) |
cd67cda5 CB |
620 | opened for write by the perlio layer will now be line buffered to prevent the |
621 | introduction of spurious line breaks whenever the perlio buffer fills up. | |
622 | ||
8f97a47a | 623 | =back |
c8bbf675 | 624 | |
8f97a47a | 625 | =head1 Internal Changes |
c8bbf675 | 626 | |
8f97a47a | 627 | =over 4 |
07d5f7aa | 628 | |
9ae8c3d9 FC |
629 | =item * |
630 | ||
b7bd32cc FC |
631 | C<lex_start> has been added to the API, but is considered experimental. |
632 | ||
633 | =item * | |
634 | ||
635 | A new C<parse_block> function has been added to the API | |
636 | L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>. | |
637 | ||
638 | =item * | |
639 | ||
c678e617 | 640 | A new, experimental API has been added for accessing the internal |
b7bd32cc FC |
641 | structure that Perl uses for C<%^H>. See the functions beginning with |
642 | C<cophh_> in L<perlapi>. | |
9ae8c3d9 | 643 | |
a5e71717 FC |
644 | =item * |
645 | ||
646 | A stash can now have a list of effective names in addition to its usual | |
8ff01ef0 FC |
647 | name. The first effective name can be accessed via the C<HvENAME> macro, |
648 | which is now the recommended name to use in MRO linearisations (C<HvNAME> | |
649 | being a fallback if there is no C<HvENAME>). | |
650 | ||
651 | These names are added and deleted via C<hv_ename_add> and | |
652 | C<hv_ename_delete>. These two functions are I<not> part of the API. | |
a5e71717 | 653 | |
b293762b FC |
654 | =item * |
655 | ||
656 | The way the parser handles labels has been cleaned up and refactored. As a | |
657 | result, the C<newFOROP()> constructor function no longer takes a parameter | |
658 | stating what label is to go in the state op. | |
659 | ||
660 | =item * | |
661 | ||
662 | The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line | |
663 | number as a parameter. | |
664 | ||
665 | =item * | |
666 | ||
667 | A new C<parse_barestmt()> function has been added, for parsing a statement | |
668 | without a label. | |
669 | ||
670 | =item * | |
671 | ||
672 | A new C<parse_label()> function has been added, that parses a statement | |
46c4051f | 673 | label, separate from statements. |
b293762b FC |
674 | |
675 | =item * | |
676 | ||
677 | The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()> | |
678 | has been added to replace assignment to C<CvSTASH()>. This is to ensure | |
679 | that backreferences are handled properly. These macros are not part of the | |
680 | API. | |
681 | ||
682 | =item * | |
683 | ||
684 | The C<op_scope()> and C<op_lvalue()> functions have been added to the API, | |
685 | but are considered experimental. | |
686 | ||
8f97a47a | 687 | =back |
825563b9 | 688 | |
8f97a47a | 689 | =head1 Selected Bug Fixes |
825563b9 | 690 | |
8f97a47a | 691 | =over 4 |
825563b9 | 692 | |
020fe755 AB |
693 | =item * |
694 | ||
b7bd32cc FC |
695 | The C<parse_stmt> C function added in earlier in the 5.13.x series has been |
696 | fixed to work with statements ending with C<}> | |
697 | L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>. | |
698 | ||
699 | =item * | |
700 | ||
701 | The C<parse_fullstmt> C function added in 5.13.5 has been fixed to work | |
702 | when called while an expression is being parsed. | |
703 | ||
704 | =item * | |
705 | ||
706 | Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match | |
707 | themselves if the string happened to be UTF8-encoded internally, the | |
708 | regular expression was not, and the character in the regular expression was | |
709 | inside a repeated group (e.g., | |
c678e617 | 710 | C<Encode::decode_utf8("\303\200") =~ /(\xc0)+/>) |
b7bd32cc FC |
711 | L<[perl #78464]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78464>. |
712 | ||
713 | =item * | |
714 | ||
715 | The C<(?d)> regular expression construct now overrides a previous C<(?u)> | |
716 | or C<use feature "unicode_string"> | |
717 | L<[perl #78508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78508>. | |
718 | ||
719 | =item * | |
720 | ||
721 | A memory leak in C<do "file">, introduced in perl 5.13.6, has been fixed | |
722 | L<[perl #78488]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78488>. | |
020fe755 | 723 | |
b293762b FC |
724 | =item * |
725 | ||
726 | Various bugs related to typeglob dereferencing have been fixed. See | |
727 | L</Dereferencing typeglobs>, above. | |
728 | ||
729 | =item * | |
730 | ||
731 | The C<SvPVbyte> function available to XS modules now calls magic before | |
732 | downgrading the SV, to avoid warnings about wide characters | |
733 | L<[perl #72398]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72398>. | |
734 | ||
735 | =item * | |
736 | ||
737 | The C<=> operator used to ignore magic (e.g., tie methods) on its | |
738 | right-hand side if the scalar happened to hold a typeglob. This could | |
739 | happen if a typeglob was the last thing returned from or assigned to a tied | |
740 | scalar | |
741 | L<[perl #77498]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77498>. | |
742 | ||
743 | =item * | |
744 | ||
745 | C<sprintf> was ignoring locales when called with constant arguments | |
746 | L<[perl #78632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78632>. | |
747 | ||
9b7c43ba KW |
748 | =item * |
749 | ||
750 | A non-ASCII character in the Latin-1 range could match both a Posix | |
751 | class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is | |
752 | now fixed for regular expressions compiled under the C<"u"> modifier. | |
753 | See L</C<use feature "unicode_strings"> now applies to more regex matching>. | |
754 | L<[perl #18281]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=18281>. | |
755 | ||
8ff01ef0 FC |
756 | =item * |
757 | ||
758 | Concatenating long strings under C<use encoding> no longer causes perl to | |
759 | crash | |
760 | L<[perl #78674]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78674>. | |
761 | ||
762 | =item * | |
763 | ||
e55e5103 FC |
764 | Typeglob assignments would crash if the glob's stash no longer existed, so |
765 | long as the glob assigned to was named 'ISA' or the glob on either side of | |
766 | the assignment contained a subroutine. | |
8ff01ef0 FC |
767 | |
768 | =item * | |
769 | ||
4cca7b69 FC |
770 | Calling C<< ->import >> on a class lacking an import method could corrupt |
771 | the stack, resulting in strange behaviour. For instance, | |
8ff01ef0 FC |
772 | |
773 | push @a, "foo", $b = bar->import; | |
774 | ||
775 | would assign 'foo' to C<$b> | |
776 | L<[perl #63790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63790>. | |
777 | ||
778 | =item * | |
779 | ||
780 | Creating an alias to a package when that package had been detached from the | |
781 | symbol table would result in corrupted isa caches | |
782 | L<[perl #77358]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77358>. | |
783 | ||
784 | =item * | |
785 | ||
786 | C<.=> followed by C<< <> >> or C<readline> would leak memory if C<$/> | |
787 | contained characters beyond the octet range and the scalar assigned to | |
788 | happened to be encoded as UTF8 internally | |
789 | L<[perl #72246]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72246>. | |
790 | ||
791 | =item * | |
792 | ||
793 | The C<recv> function could crash when called with the MSG_TRUNC flag | |
794 | L<[perl #75082]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75082>. | |
795 | ||
9e2ac5d4 FC |
796 | =item * |
797 | ||
798 | Evaluating a simple glob (like C<*a>) was calling get-magic on the glob, | |
799 | even when its contents were not being used | |
800 | L<[perl #78580]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78580>. | |
801 | ||
802 | This bug was introduced in 5.13.2 and did not affect earlier perl versions. | |
803 | ||
15bc3b4f FC |
804 | =item * |
805 | ||
806 | Matching a Unicode character against an alternation containing characters | |
807 | that happened to match continuation bytes in the former's UTF8 | |
808 | representation (C<qq{\x{30ab}} =~ /\xab|\xa9/>) would cause erroneous | |
809 | warnings | |
810 | L<[perl #70998]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=70998>. | |
811 | ||
812 | =item * | |
813 | ||
814 | C<s///r> (added in 5.13.2) no longer leaks. | |
815 | ||
ca60ecf2 FC |
816 | =item * |
817 | ||
818 | The trie optimisation was not taking empty groups into account, preventing | |
819 | 'foo' from matching C</\A(?:(?:)foo|bar|zot)\z/> | |
820 | L<[perl #78356]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78356>. | |
821 | ||
822 | =item * | |
823 | ||
824 | A pattern containing a C<+> inside a lookahead would sometimes cause an | |
825 | incorrect match failure in a global match (e.g., C</(?=(\S+))/g>) | |
826 | L<[perl #68564]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68564>. | |
827 | ||
828 | =item * | |
829 | ||
830 | Iterating with C<foreach> over an array returned by an lvalue sub now works | |
831 | L<[perl #23790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=23790>. | |
832 | ||
833 | =item * | |
834 | ||
835 | C<$@> is now localised during calls to C<binmode> to prevent action at a | |
836 | distance | |
837 | L<[perl #78844]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78844>. | |
838 | ||
839 | =item * | |
840 | ||
841 | C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now | |
842 | updated properly when packages are deleted or removed from the C<@ISA> of | |
843 | other classes. This allows many packages to be created and deleted without | |
844 | causing a memory leak | |
845 | L<[perl #75176]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75176>. | |
846 | ||
847 | =item * | |
848 | ||
518a9858 FC |
849 | C<undef *Foo::> and C<undef *Foo::ISA> and C<delete $package::{ISA}> |
850 | used not to update the internal isa caches if the | |
851 | stash or C<@ISA> array had a reference elsewhere. In | |
ca60ecf2 | 852 | fact, C<undef *Foo::ISA> would stop a new C<@Foo::ISA> array from updating |
7683cad7 | 853 | caches. |
ca60ecf2 | 854 | |
38dbd939 FC |
855 | =item * |
856 | ||
857 | C<@ISA> arrays can now be shared between classes via | |
858 | C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA> | |
859 | L<[perl #77238]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77238>. | |
860 | ||
861 | =item * | |
862 | ||
863 | The parser no longer hangs when encountering certain Unicode characters, | |
864 | such as U+387 | |
865 | L<[perl #74022]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74022>. | |
866 | ||
867 | =item * | |
868 | ||
b4bbb350 FC |
869 | C<formline> no longer crashes when passed a tainted format picture. It also |
870 | taints C<$^A> now if its arguments are tainted | |
38dbd939 FC |
871 | L<[perl #79138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79138>. |
872 | ||
6d07abef CBW |
873 | =item * |
874 | ||
875 | A signal handler called within a signal handler could cause leaks or | |
876 | double-frees. Now fixed. | |
877 | L<[perl #76248]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76248>. | |
878 | ||
ad434082 FR |
879 | =item * |
880 | ||
881 | When trying to report C<Use of uninitialized value $Foo::BAR>, crashes could | |
882 | occur if the GLOB of the global variable causing the warning has been detached | |
883 | from its original stash by, for example C<delete $::{'Foo::'}>. This has been | |
884 | fixed by disabling the reporting of variable names in the warning in those | |
885 | cases. | |
886 | ||
8f97a47a | 887 | =back |
020fe755 | 888 | |
8f97a47a | 889 | =head1 Obituary |
405fd67e | 890 | |
dd56ec38 DG |
891 | Randy Kobes, creator of the kobesearch alternative to search.cpan.org and |
892 | contributor/maintainer to several core Perl toolchain modules, passed away | |
67fa491b | 893 | on September 18, 2010 after a battle with lung cancer. His contributions |
dd56ec38 DG |
894 | to the Perl community will be missed. |
895 | ||
ee0887a9 | 896 | =head1 Acknowledgements |
0195fb5f | 897 | |
91a7d54e | 898 | Perl 5.13.7 represents approximately one month of development since Perl 5.13.6 |
57fc91ac | 899 | and contains 73100 lines of changes across 518 files from 39 authors and committers: |
91a7d54e CBW |
900 | |
901 | Abhijit Menon-Sen, Abigail, Ben Morrow, Chas. J. Owens IV, Chris 'BinGOs' Williams, Craig A. Berry, | |
902 | David Golden, David Mitchell, Father Chrysostomos, Fingle Nark, Florian Ragwitz, George Greer, | |
903 | Grant McLean, H.Merijn Brand, Ian Goodacre, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson, | |
904 | Lubomir Rintel, Marty Pauley, Moritz Lenz, Nicholas Clark, Nicolas Kaiser, Niko Tyni, Peter John Acklam, | |
905 | Rafael Garcia-Suarez, Shlomi Fish, Steffen Mueller, Steve Hay, Tatsuhiko Miyagawa, Tim Bunce, Todd Rinaldo, | |
906 | Tom Christiansen, Tom Hukins, Tony Cook, Yves Orton, Zefram and brian d foy | |
907 | ||
908 | Many of the changes included in this version originated in the CPAN modules included in | |
909 | Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish. | |
4c793fe3 FR |
910 | |
911 | =head1 Reporting Bugs | |
912 | ||
913 | If you find what you think is a bug, you might check the articles | |
914 | recently posted to the comp.lang.perl.misc newsgroup and the perl | |
915 | bug database at http://rt.perl.org/perlbug/ . There may also be | |
916 | information at http://www.perl.org/ , the Perl Home Page. | |
917 | ||
918 | If you believe you have an unreported bug, please run the B<perlbug> | |
919 | program included with your release. Be sure to trim your bug down | |
920 | to a tiny but sufficient test case. Your bug report, along with the | |
921 | output of C<perl -V>, will be sent off to perlbug@perl.org to be | |
922 | analysed by the Perl porting team. | |
923 | ||
924 | If the bug you are reporting has security implications, which make it | |
925 | inappropriate to send to a publicly archived mailing list, then please send | |
ee0887a9 | 926 | it to perl5-security-report@perl.org. This points to a closed subscription |
4c793fe3 FR |
927 | unarchived mailing list, which includes all the core committers, who be able |
928 | to help assess the impact of issues, figure out a resolution, and help | |
929 | co-ordinate the release of patches to mitigate or fix the problem across all | |
ee0887a9 | 930 | platforms on which Perl is supported. Please only use this address for |
4c793fe3 FR |
931 | security issues in the Perl core, not for modules independently |
932 | distributed on CPAN. | |
933 | ||
934 | =head1 SEE ALSO | |
935 | ||
936 | The F<Changes> file for an explanation of how to view exhaustive details | |
937 | on what changed. | |
938 | ||
939 | The F<INSTALL> file for how to build Perl. | |
940 | ||
941 | The F<README> file for general stuff. | |
942 | ||
943 | The F<Artistic> and F<Copying> files for copyright information. | |
944 | ||
945 | =cut |