オープンソース・ソフトウェアの開発とダウンロード

CVS リポジトリの参照

Contents of /perldocjp/docs/perl/5.16.0/perl5160delta.pod

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.12 - (show annotations) (download)
Fri Apr 27 15:26:59 2012 UTC (12 years ago) by argrath
Branch: MAIN
Changes since 1.11: +59 -0 lines
in progress

1
2 =encoding utf8
3
4 =head1 NAME
5
6 =begin original
7
8 perl5160delta - what is new for perl v5.16.0
9
10 =end original
11
12 perl5160delta - perl v5.16.0 での変更点
13
14 =head1 DESCRIPTION
15
16 =begin original
17
18 This document describes differences between the 5.14.0 release and
19 the 5.16.0 release.
20
21 =end original
22
23 この文書は 5.14.0 リリースと 5.16.0 リリースの変更点を記述しています。
24
25 =begin original
26
27 If you are upgrading from an earlier release such as 5.12.0, first read
28 L<perl5140delta>, which describes differences between 5.12.0 and
29 5.14.0.
30
31 =end original
32
33 5.12.0 のような以前のリリースから更新する場合は、まず 5.12.0 と
34 5.14.0 の違いについて記述している L<perl5140delta> を読んでください。
35
36 =head1 Notice
37
38 =begin original
39
40 As described in L<perlpolicy>, the release of Perl 5.16.0 marks the
41 official end of support for Perl 5.12. Users of Perl 5.12 or earlier
42 should consider upgrading to a more recent release of Perl.
43
44 =end original
45
46 L<perlpolicy> に記述されているように、Perl 5.16.0 によって Perl 5.12 の
47 サポートが公式に終了します。
48 Perl 5.12 以前のユーザーはより新しい Perl にアップグレードすることを
49 検討するべきです。
50
51 =head1 Core Enhancements
52
53 (コアの拡張)
54
55 =head2 C<use I<VERSION>>
56
57 =begin original
58
59 As of this release, version declarations like C<use v5.16> now disable
60 all features before enabling the new feature bundle. This means that
61 the following holds true:
62
63 =end original
64
65 このリリース以降、C<use v5.16> のようなバージョン宣言は、新しい機能が
66 有効になる前の全ての機能が無効になるようになりました。
67 これは、以下のようなものが真であることを意味します:
68
69 use 5.016;
70 # only 5.16 features enabled here
71 use 5.014;
72 # only 5.14 features enabled here (not 5.16)
73
74 =begin original
75
76 C<use v5.12> and higher continue to enable strict, but explicit C<use
77 strict> and C<no strict> now override the version declaration, even
78 when they come first:
79
80 =end original
81
82 C<use v5.12> 以上は strict を有効にするという機能ははそのままですが、
83 明示的な C<use strict> と C<no strict> は (先に現れても) バージョン定義を
84 上書きするようになりました:
85
86 no strict;
87 use 5.012;
88 # no strict here
89
90 =begin original
91
92 There is a new ":default" feature bundle that represents the set of
93 features enabled before any version declaration or C<use feature> has
94 been seen. Version declarations below 5.10 now enable the ":default"
95 feature set. This does not actually change the behaviour of C<use
96 v5.8>, because features added to the ":default" set are those that were
97 traditionally enabled by default, before they could be turned off.
98
99 =end original
100
101 新しい ":default" 機能は、任意のバージョン定義や C<use feature> が
102 現れる前に有効な機能の集合を表現します。
103 5.10 以前のバージョン宣言は ":default" 機能集合を有効にするように
104 なりました。
105 これは実際には C<use v5.8> の振る舞いを変更しません; なぜなら
106 ":default" 集合は、機能を無効に出来るようになる前に伝統的にデフォルトで
107 有効になっていたものだからです。
108
109 =begin original
110
111 C<< no feature >> now resets to the default feature set. To disable all
112 features (which is likely to be a pretty special-purpose request, since
113 it presumably won't match any named set of semantics) you can now
114 write C<< no feature ':all' >>.
115
116 =end original
117
118 C<< no feature >> はデフォルト機能集合をリセットするようになりました。
119 全ての機能を無効にする (これはかなり特殊な用途の要求です; なぜなら
120 おそらく動作の全ての名前付き集合にマッチングしないからです) には、
121 C<< no feature ':all' >> と書けるようになります。
122
123 =begin original
124
125 C<$[> is now disabled under C<use v5.16>. It is part of the default
126 feature set and can be turned on or off explicitly with C<use feature
127 'array_base'>.
128
129 =end original
130
131 C<$[> は C<use v5.16> の元では無効になるようになりました。
132 これはデフォルト機能集合の一部で、 C<use feature 'array_base'> によって
133 明示的に有効無効を切り替えられます。
134
135 =head2 C<__SUB__>
136
137 =begin original
138
139 The new C<__SUB__> token, available under the C<current_sub> feature
140 (see L<feature>) or C<use v5.16>, returns a reference to the current
141 subroutine, making it easier to write recursive closures.
142
143 =end original
144
145 C<current_sub> 機能 (L<feature> 参照) または C<use v5.16> で利用可能な
146 C<__SUB__> トークンは現在のサブルーチンへのリファレンスを返すことで、
147 再帰クロージャを書くのを容易にします。
148
149 =head2 New and Improved Built-ins
150
151 (新規または改良された組み込み関数)
152
153 =head3 More consistent C<eval>
154
155 (より一貫性のある C<eval>)
156
157 =begin original
158
159 The C<eval> operator sometimes treats a string argument as a sequence of
160 characters and sometimes as a sequence of bytes, depending on the
161 internal encoding. The internal encoding is not supposed to make any
162 difference, but there is code that relies on this inconsistency.
163
164 =end original
165
166 C<eval> 演算子は内部エンコーディングに依存して、時には文字列引数を
167 文字の並びとして、時にはバイトの並びとして扱います。
168 内部エンコーディングは何の違いもないはずですが、この非一貫性に依存した
169 コードがあります。
170
171 =begin original
172
173 The new C<unicode_eval> and C<evalbytes> features (enabled under C<use
174 5.16.0>) resolve this. The C<unicode_eval> feature causes C<eval
175 $string> to treat the string always as Unicode. The C<evalbytes>
176 features provides a function, itself called C<evalbytes>, which
177 evaluates its argument always as a string of bytes.
178
179 =end original
180
181 (C<use 5.16.0> で有効になる)新しい C<unicode_eval> 機能と
182 C<evalbytes> 機能はこれを解決します。
183 C<unicode_eval> 機能は、C<eval $string> での文字列を常に Unicode として
184 扱います。
185 C<evalbytes> 機能は、引数を常にバイト列として扱う C<evalbytes> 関数を
186 提供します。
187
188 =begin original
189
190 These features also fix oddities with source filters leaking to outer
191 dynamic scopes.
192
193 =end original
194
195 これらの機能は、ソースフィルタが外側の動的スコープにリークする問題も
196 修正します。
197
198 =begin original
199
200 See L<feature> for more detail.
201
202 =end original
203
204 さらなる詳細については L<feature> を参照してください。
205
206 =head3 C<substr> lvalue revamp
207
208 (C<substr> 左辺値の刷新)
209
210 =for comment Does this belong here, or under Incomptable Changes?
211
212 =begin original
213
214 When C<substr> is called in lvalue or potential lvalue context with two
215 or three arguments, a special lvalue scalar is returned that modifies
216 the original string (the first argument) when assigned to.
217
218 =end original
219
220 左辺値や潜在的な左辺値コンテキストで 2 引数または 3 引数の C<substr> が
221 呼び出されると、代入するときに元の文字列(1 番目の引数)を修正する
222 特殊な左辺値スカラを返します。
223
224 =begin original
225
226 Previously, the offsets (the second and third arguments) passed to
227 C<substr> would be converted immediately to match the string, negative
228 offsets being translated to positive and offsets beyond the end of the
229 string being truncated.
230
231 =end original
232
233 以前は、C<substr> に渡されたオフセット(2 番目と 3 番目の引数) は直ちに
234 文字列にマッチするように変換され、負のオフセットは正に変換され、
235 文字列の末尾を越えるオフセットは切り詰められました。
236
237 =begin original
238
239 Now, the offsets are recorded without modification in the special
240 lvalue scalar that is returned, and the original string is not even
241 looked at by C<substr> itself, but only when the returned lvalue is
242 read or modified.
243
244 =end original
245
246 今では、オフセットは返される特殊左辺値スカラに修正なしに記録され、
247 元の文字列は C<substr> 自身によっても見ませんが、返された左辺値は
248 読んだり修正したりしたときだけです。
249
250 =begin original
251
252 These changes result in an incompatible change:
253
254 =end original
255
256 これらの変更はいくつかの互換性のない変更を引き起こします:
257
258 =begin original
259
260 If the original string changes length after the call to C<substr> but
261 before assignment to its return value, negative offsets will remember
262 their position from the end of the string, affecting code like this:
263
264 =end original
265
266 C<substr> を呼び出した後、返り値が代入される前に、元の文字列の長さが
267 変更されると、負のオフセットは文字列の末尾からの位置を覚えているので、
268 以下のようなコードに影響を与えます:
269
270 my $string = "string";
271 my $lvalue = \substr $string, -4, 2;
272 print $lvalue, "\n"; # prints "ri"
273 $string = "bailing twine";
274 print $lvalue, "\n"; # prints "wi"; used to print "il"
275
276 =begin original
277
278 The same thing happens with an omitted third argument. The returned
279 lvalue will always extend to the end of the string, even if the string
280 becomes longer.
281
282 =end original
283
284 同じことは省略された 3 番目の引数でも起こります。
285 返された左辺値は、たとえ文字列が長くなっても、常に文字列の末尾に
286 拡張されます。
287
288 =begin original
289
290 Since this change also allowed many bugs to be fixed (see
291 L</The C<substr> operator>), and since the behaviour
292 of negative offsets has never been specified, so the
293 change was deemed acceptable.
294
295 =end original
296
297 この変更により多くのバグを修正できるようになり、
298 L</Fixes to the C<substr> operator> を参照してください)、
299 負数のオフセットの振る舞いは仕様になったことはないので、この変更は
300 受け入れられる取引でした。
301
302 =head3 Return value of C<tied>
303
304 (C<tied> の返り値)
305
306 =begin original
307
308 The value returned by C<tied> on a tied variable is now the actual
309 scalar that holds the object to which the variable is tied. This
310 allows ties to be weakened with C<Scalar::Util::weaken(tied
311 $tied_variable)>.
312
313 =end original
314
315 tie された変数に対する C<tied> によって返される値は、変数が tie された
316 オブジェクトを保持する実際のスカラになりました。
317 これにより C<Scalar::Util::weaken(tied $tied_variable)> で tie を
318 弱めることが出来るようになります。
319
320 =head2 Unicode Support
321
322 (Unicode 対応)
323
324 =head3 Supports (I<almost>) Unicode 6.1
325
326 ((I<ほぼ>) Unicode 6.1 対応)
327
328 =begin original
329
330 Besides the addition of whole new scripts, and new characters in
331 existing scripts, this new version of Unicode, as always, makes some
332 changes to existing characters. One change that may trip up some
333 applications is that the General Category of two characters in the
334 Latin-1 range, PILCROW SIGN and SECTION SIGN, has been changed from
335 Other_Symbol to Other_Punctuation. The same change has been made for
336 a character in each of Tibetan, Ethiopic, and Aegean.
337 The code points U+3248..U+324F (CIRCLED NUMBER TEN ON BLACK SQUARE
338 through CIRCLED NUMBER EIGHTY ON BLACK SQUARE) have had their General
339 Category changed from Other_Symbol to Other_Numeric. The Line Break
340 property has changes for Hebrew and Japanese; and as a consequence of
341 other changes in 6.1, the Perl regular expression construct C<\X> now
342 works differently for some characters in Thai and Lao.
343
344 =end original
345
346 完全に新しい用字や、既にある用字への新しい文字の他に、新しい
347 Unicode はいつも通り、既にある文字もいくつか変更しています。
348 アプリケーションをつまずかせるかもしれない変更の一つは、
349 Latin-1 の範囲にある二つの文字 PILCROW SIGN および SECTION SIGN の
350 一般カテゴリは Other_Symbol から Other_Punctuation に変更されました。
351 同じ変更は Tibetan, Ethiopic, Aegean の文字に対しても行われました。
352 符号位置 U+3248..U+324F (CIRCLED NUMBER TEN ON BLACK SQUARE から
353 CIRCLED NUMBER EIGHTY ON BLACK SQUARE) の一般カテゴリは
354 Other_Symbol から Other_Numeric に変更されました。
355 Line Break 特性は Hebrew と Japanese で変更されました; そして 6.1 での
356 その他の変更の結果として、Perl の正規表現構造 C<\X> は Thai と Lao の
357 いくつかの文字では異なった動作をします。
358
359 =begin original
360
361 New aliases (synonyms) have been defined for many property values;
362 these, along with the previously existing ones, are all cross-indexed in
363 L<perluniprops>.
364
365 =end original
366
367 新しい別名が多くの特性値に定義されました; これらは、既に存在するものと
368 あわせて、全て L<perluniprops> にクロスインデックスされています。
369
370 =begin original
371
372 The return value of C<charnames::viacode()> is affected by other
373 changes:
374
375 =end original
376
377 C<charnames::viacode()> の帰り値はその他の変更の影響を受けます:
378
379 Code point Old Name New Name
380 U+000A LINE FEED (LF) LINE FEED
381 U+000C FORM FEED (FF) FORM FEED
382 U+000D CARRIAGE RETURN (CR) CARRIAGE RETURN
383 U+0085 NEXT LINE (NEL) NEXT LINE
384 U+008E SINGLE-SHIFT 2 SINGLE-SHIFT-2
385 U+008F SINGLE-SHIFT 3 SINGLE-SHIFT-3
386 U+0091 PRIVATE USE 1 PRIVATE USE-1
387 U+0092 PRIVATE USE 2 PRIVATE USE-2
388 U+2118 SCRIPT CAPITAL P WEIERSTRASS ELLIPTIC FUNCTION
389
390 =begin original
391
392 Perl will accept any of these names as input, but
393 C<charnames::viacode()> now returns the new name of each pair. The
394 change for U+2118 is considered by Unicode to be a correction, that is
395 the original name was a mistake (but again, it will remain forever valid
396 to use it to refer to U+2118). But most of these changes are the
397 fallout of the mistake Unicode 6.0 made in naming a character used in
398 Japanese cell phones to be "BELL", which conflicts with the longstanding
399 industry use of (and Unicode's recommendation to use) that name
400 to mean the ASCII control character at U+0007. As a result, that name
401 has been deprecated in Perl since v5.14; and any use of it will raise a
402 warning message (unless turned off). The name "ALERT" is now the
403 preferred name for this code point, with "BEL" being an acceptable short
404 form. The name for the new cell phone character, at code point U+1F514,
405 remains undefined in this version of Perl (hence we don't quite
406 implement all of Unicode 6.1), but starting in v5.18, BELL will mean
407 this character, and not U+0007.
408
409 =end original
410
411 Perl は任意の名前を入力として受け付けますが、C<charnames::viacode()> は
412 それぞれのペアの新しい名前を返すようになりました。
413 U+2118 の変更は、元の名前が間違っていたための Unicode による訂正と
414 考えられます(しかし再び、これは U+2118 を参照するために永遠に有効の
415 ままです)。
416 しかしこれらの変更の中で最大のものは、日本の携帯電話で使われている
417 文字の名前に、長い間実用されている (そして Unicode も使用を推奨している
418 ASCII 制御文字 U+0007 と衝突している "BELL" という名前を付けたことによる
419 副産物です。
420 結果として、この名前は v5.14 以降 Perl では非推奨となっています;
421 そしてこれを使うと(オフにしていなければ)警告メッセージが発生します。
422 この符号位置に対する適切な名前は "ALERT" になり、短い形式として
423 "BEL" が受け入れられるようになります。
424 このバージョンの Perl では、符号位置 U+1F514 の新しい携帯電話の文字の
425 名前は未定義のままです(従って私たちは Unicode 6.1 の完全に全てを
426 実装しているわけではありません)が、v5.18 から BELL は U+0007 ではなく
427 この文字を意味するようになります。
428
429 =begin original
430
431 Unicode has taken steps to make sure that this sort of mistake does not
432 happen again. The Standard now includes all the generally accepted
433 names and abbreviations for control characters, whereas previously it
434 didn't (though there were recommended names for most of them, which Perl
435 used). This means that most of those recommended names are now
436 officially in the Standard. Unicode did not recommend names for the
437 four code points listed above between U+008E and U+008F, and in
438 standardizing them Unicode subtly changed the names that Perl had
439 previously given them, by replacing the final blank in each name by a
440 hyphen. Unicode also officially accepts names that Perl had deprecated,
441 such as FILE SEPARATOR. Now the only deprecated name is BELL.
442 Finally, Perl now uses the new official names instead of the old
443 (now considered obsolete) names for the first four code points in the
444 list above (the ones which have the parentheses in them).
445
446 =end original
447
448 Unicode はこのような過ちが再び起きないようにするための対策を取りました。
449 今では標準には制御文字に対して、全ての一般的に受け入れられている名前を
450 含むようになりました(以前は含んでいませんでしたが、そのほとんどは
451 Perl が使っていた推奨される名前でした)。
452 Unicode は U+008E から U+008F の間の上述の四つの符号位置に対する
453 名前を推奨しておらず、and in
454 standardizing them Unicode subtly changed the names that Perl had
455 previously given them, by replacing the final blank in each name by a
456 hyphen.
457 Unicode はまた、FILE SEPARATOR のように Perl では非推奨とした名前を
458 公式に受け入れました。
459 今では唯一の非推奨の名前は BELL です。
460 最終的に、上述の四つの符号位置の名前として古い(今では古いものとなったと
461 考えられる)名前ではなく、新しい公式の名前(かっこで囲まれたもの)を使います。
462 (TBT)
463
464 =begin original
465
466 Now that the names have been placed in the Unicode standard, these kinds
467 of changes should not happen again, though corrections, such as to
468 U+2118, are still possible.
469
470 =end original
471
472 名前が Unicode 標準に入ったことにより、この種の変更は再び発生することは
473 ありませんが、U+2118 に対するような修正は引き続き起こりえます。
474
475 =begin original
476
477 Unicode also added some name abbreviations, which Perl now accepts:
478 SP for SPACE;
479 TAB for CHARACTER TABULATION;
480 NEW LINE, END OF LINE, NL, and EOL for LINE FEED;
481 LOCKING-SHIFT ONE for SHIFT OUT;
482 LOCKING-SHIFT ZERO for SHIFT IN;
483 and ZWNBSP for ZERO WIDTH NO-BREAK SPACE.
484
485 =end original
486
487 Unicode はまたいくつかの名前の略称を追加し、Perl でも使えるようになりました:
488 SPACE 用に SP;
489 CHARACTER TABULATION 用に TAB;
490 LINE FEED 用に NEW LINE, END OF LINE, NL, EOL;
491 SHIFT OUT 用に LOCKING-SHIFT ONE;
492 SHIFT IN 用に LOCKING-SHIFT ZERO;
493 ZERO WIDTH NO-BREAK SPACE 用に ZWNBSP。
494
495 =begin original
496
497 More details on this version of Unicode are provided in
498 L<http://www.unicode.org/versions/Unicode6.1.0/>.
499
500 =end original
501
502 このバージョンの Unicode に関するさらなる詳細は
503 L<http://www.unicode.org/versions/Unicode6.1.0/> で提供されています。
504
505 =head3 C<use charnames> is no longer needed for C<\N{I<name>}>
506
507 (C<\N{I<name>}> には C<use charnames> は不要に)
508
509 =begin original
510
511 When C<\N{I<name>}> is encountered, the C<charnames> module is now
512 automatically loaded when needed as if the C<:full> and C<:short>
513 options had been specified. See L<charnames> for more information.
514
515 =end original
516
517 C<\N{I<name>}> に遭遇すると、必要なら C<:full> と C<:short> のオプションが
518 指定されたかのように C<charnames> モジュールが自動的に読み込まれるように
519 なりました。
520 さらなる情報については L<charnames> を参照してください。
521
522 =head3 C<\N{...}> can now have Unicode loose name matching
523
524 (C<\N{...}> は Unicode の緩い名前のマッチングに)
525
526 =begin original
527
528 This is described in the C<charnames> item in
529 L</Updated Modules and Pragmata> below.
530
531 =end original
532
533 これは後述する L</Updated Modules and Pragmata> の
534 C<charnames> に記述されています。
535
536 =head3 Unicode Symbol Names
537
538 (Unicode シンボル名)
539
540 =begin original
541
542 Perl now has proper support for Unicode in symbol names. It used to be
543 that C<*{$foo}> would ignore the internal UTF8 flag and use the bytes of
544 the underlying representation to look up the symbol. That meant that
545 C<*{"\x{100}"}> and C<*{"\xc4\x80"}> would return the same thing. All
546 these parts of Perl have been fixed to account for Unicode:
547
548 =end original
549
550 Perl はシンボル名に対する Unicode 対応を適切に行うようになりました。
551 今までは C<*{$foo}> は内部 UTF8フラグを無視して、基となっているバイト列を
552 使います。
553
554 =over
555
556 =item *
557
558 =begin original
559
560 Method names (including those passed to C<use overload>)
561
562 =end original
563
564 メソッド名 (C<use overload> に渡されるものも含みます)
565
566 =item *
567
568 =begin original
569
570 Typeglob names (including names of variables, subroutines and filehandles)
571
572 =end original
573
574 型グロブ名 (変数、サブルーチン、ファイルハンドルの名前を含みます)
575
576 =item *
577
578 =begin original
579
580 Package names
581
582 =end original
583
584 パッケージ名
585
586 =item *
587
588 C<goto>
589
590 =item *
591
592 =begin original
593
594 Symbolic dereferencing
595
596 =end original
597
598 シンボリックなデリファレンス
599
600 =item *
601
602 =begin original
603
604 Second argument to C<bless()> and C<tie()>
605
606 =end original
607
608 C<bless()> と C<tie()> への第 2 引数
609
610 =item *
611
612 =begin original
613
614 Return value of C<ref()>
615
616 =end original
617
618 C<ref()> の返り値
619
620 =item *
621
622 =begin original
623
624 Subroutine prototypes
625
626 =end original
627
628 サブルーチンプロトタイプ
629
630 =item *
631
632 =begin original
633
634 Attributes
635
636 =end original
637
638 属性
639
640 =item *
641
642 =begin original
643
644 Various warnings and error messages that mention variable names or values,
645 methods, etc.
646
647 =end original
648
649 変数名や値、メソッドなどに言及する様々な警告やエラーメッセージ
650
651 =back
652
653 =begin original
654
655 In addition, a parsing bug has been fixed that prevented C<*{é}> from
656 implicitly quoting the name, but instead interpreted it as C<*{+é}>, which
657 would cause a strict violation.
658
659 =end original
660
661 さらに、C<*{é}> を暗黙にクォートする名前から除外するバグが修正され、
662 strict 違反となる C<*{+é}> として解釈されるようになりました。
663
664 =begin original
665
666 C<*{"*a::b"}> automatically strips off the * if it is followed by an ASCII
667 letter. That has been extended to all Unicode identifier characters.
668
669 =end original
670
671 C<*{"*a::b"}> は、* の後に ASCII 文字が引き続いている場合は * が自動的に
672 削除されます。
673 これは全ての Unicode 識別子文字に拡張されました。
674
675 =begin original
676
677 One-character non-ASCII non-punctuation variables (like C<$é>) are now
678 subject to "Used only once" warnings. They used to be exempt, as they
679 was treated as punctuation variables.
680
681 =end original
682
683 (C<$é> のような) 単一文字非 ASCII 非句読点変数はは
684 "Used only once" 警告を出すようになりました。
685 今までは、これは句読点変数として扱われていたので警告から免れていました。
686
687 =begin original
688
689 Also, single-character Unicode punctuation variables (like C<$‰>) are now
690 supported [perl #69032].
691
692 =end original
693
694 また、(C<$‰> のような)単一文字の Unicode 句読点変数に対応しました
695 [perl #69032]。
696
697 =head3 Improved ability to mix locales and Unicode, including UTF-8 locales
698
699 ((UTF-8 ロケールを含む)ロケールと Unicode を混ぜる能力の改善)
700
701 =begin original
702
703 An optional parameter has been added to C<use locale>
704
705 =end original
706
707 C<use locale> にオプションの引数が追加されました:
708
709 use locale ':not_characters';
710
711 =begin original
712
713 which tells Perl to use all but the C<LC_CTYPE> and C<LC_COLLATE>
714 portions of the current locale. Instead, the character set is assumed
715 to be Unicode. This allows locales and Unicode to be seamlessly mixed,
716 including the increasingly frequent UTF-8 locales. When using this
717 hybrid form of locales, the C<:locale> layer to the L<open> pragma can
718 be used to interface with the file system, and there are CPAN modules
719 available for ARGV and environment variable conversions.
720
721 =end original
722
723 は、現在のロケールのうち、C<LC_CTYPE> と C<LC_COLLATE> 以外の全てを
724 使うことを Perl に知らせます。
725 それ以外では、文字集合は Unicode であると仮定します。
726 これにより、徐々に頻繁に出てくる UTF-8 ロケールを含む、ロケールと
727 Unicode をシームレスに混ぜることが出来るようになります。
728 このハイブリッド形式のロケールを使うとき、
729 L<open> への C<:locale> 層をファイルシステムへのインターフェースとして
730 使うことができ、ARGV と環境変数の変換のための CPAN モジュールを
731 利用可能です。
732
733 =begin original
734
735 Full details are in L<perllocale>.
736
737 =end original
738
739 完全な詳細は L<perllocale> にあります。
740
741 =head3 New function C<fc> and corresponding escape sequence C<\F> for Unicode foldcase
742
743 (Unicode 畳み込み文字のための新しい関数 C<fc> と対応するエスケープシーケンス C<\F>)
744
745 =begin original
746
747 Unicode foldcase is an extension to lowercase that gives better results
748 when comparing two strings case-insensitively. It has long been used
749 internally in regular expression C</i> matching. Now it is available
750 explicitly through the new C<fc> function call (enabled by
751 S<C<"use feature 'fc'">>, or C<use v5.16>, or explicitly callable via
752 C<CORE::fc>) or through the new C<\F> sequence in double-quotish
753 strings.
754
755 =end original
756
757 Unicode の畳み込み文字は、二つの文字列を大文字小文字を無視して比較するときに
758 よりよい結果を与えるための小文字の拡張です。
759 これは長い間正規表現の C</i> マッチングで内部で使われていました。
760 これは (S<C<"use feature 'fc'">>、C<use v5.16> で有効にするか、
761 明示的な C<CORE::fc> で明示的に呼び出し可能な)新しい C<fc> 関数呼び出しか、
762 ダブルクォート風の文字列の中の新しい C<\F> シーケンスを通して
763 利用可能になりました。
764
765 =begin original
766
767 Full details are in L<perlfunc/fc>.
768
769 =end original
770
771 完全な詳細は L<perlfunc/fc> にあります。
772
773 =head3 The Unicode C<Script_Extensions> property is now supported.
774
775 (Unicode の C<Script_Extensions> 特性に対応)
776
777 =begin original
778
779 New in Unicode 6.0, this is an improved C<Script> property. Details
780 are in L<perlunicode/Scripts>.
781
782 =end original
783
784 Unicode 6.0 からの新機能で、これは改良された C<Script> 特性です。
785 詳細は L<perlunicode/Scripts> にあります。
786
787 =head2 XS Changes
788
789 =head3 Improved typemaps for Some Builtin Types
790
791 (いくつかの組み込み型の typemap の改善)
792
793 =begin original
794
795 Most XS authors will be aware that there is a longstanding bug in the
796 OUTPUT typemap for T_AVREF (C<AV*>), T_HVREF (C<HV*>), T_CVREF (C<CV*>),
797 and T_SVREF (C<SVREF> or C<\$foo>) that requires manually decrementing
798 the reference count of the return value instead of the typemap taking
799 care of this. For backwards-compatibility, this cannot be changed in the
800 default typemaps. But we now provide additional typemaps
801 C<T_AVREF_REFCOUNT_FIXED>, etc. that do not exhibit this bug. Using
802 them in your extension is as simple as having one line in your
803 C<TYPEMAP> section:
804
805 =end original
806
807 ほとんどの XS 作者は、T_AVREF (C<AV*>), T_HVREF (C<HV*>), T_CVREF (C<CV*>),
808 T_SVREF (C<SVREF> または C<\$foo>) の OUTPUT typemap は参照カウントを
809 typemap が面倒を見てくれず、手動で減らす必要があるという長い間ある
810 バグに気付いていました。
811 後方互換性のために、これはデフォルトの typemap では変更できません。
812 しかし、この問題が含まれない
813 C<T_AVREF_REFCOUNT_FIXED> などの追加の typemap を提供することになりました。
814 エクステンションでこれらを使うことで、
815 C<TYPEMAP> セクションを 1 行にまで単純化できます:
816
817 HV* T_HVREF_REFCOUNT_FIXED
818
819 =head3 C<is_utf8_char()>
820
821 =begin original
822
823 The XS-callable function C<is_utf8_char()>, when presented with
824 malformed UTF-8 input, can read up to 12 bytes beyond the end of the
825 string. This cannot be fixed without changing its API. It is not
826 called from CPAN. The documentation now describes how to use it
827 safely.
828
829 =end original
830
831 XS 呼び出し可能な関数 C<is_utf8_char()> は、不正な UTF-8 入力があると、
832 文字列の終わりを越えて最大 12 バイト読む可能性があります。
833 これは API を変更せずに修正することはできません。
834 これは CPAN からは呼び出されません。
835 文書にはこれを安全に使う方法を記述しています。
836
837 =head3 Added C<is_utf8_char_buf()>
838
839 (C<is_utf8_char_buf()> の追加)
840
841 =begin original
842
843 This function is designed to replace the deprecated L</is_utf8_char()>
844 function. It includes an extra parameter to make sure it doesn't read
845 past the end of the input buffer.
846
847 =end original
848
849 この関数は非推奨の L</is_utf8_char()> 関数を置き換えるために
850 設計されています。
851 これには入力バッファの末尾を越えて読み込まないようにするための追加の引数が
852 あります。
853
854 =head3 Other C<is_utf8_foo()> functions, as well as C<utf8_to_foo()>, etc.
855
856 (C<utf8_to_foo()> のような、その他の C<is_utf8_foo()> 関数)
857
858 =begin original
859
860 Most of the other XS-callable functions that take UTF-8 encoded input
861 implicitly assume that the UTF-8 is valid (not malformed) in regards to
862 buffer length. Do not do things such as change a character's case or
863 see if it is alphanumeric without first being sure that it is valid
864 UTF-8. This can be safely done for a whole string by using one of the
865 functions C<is_utf8_string()>, C<is_utf8_string_loc()>, and
866 C<is_utf8_string_loclen()>.
867
868 =end original
869
870 UTF-8 エンコードされた入力を取るその他の XS 呼び出し可能な関数のほとんどは
871 バッファ長に関して UTF-8 が有効である(不正でない)ことを暗黙に
872 仮定しています。
873 まず文字列が有効な UTF-8 であることを確認せずに、文字の大文字小文字を
874 変更したり、英数字かどうかを確認したりしてはいけません。
875 このようなことは、文字列全体に対して C<is_utf8_string()>,
876 C<is_utf8_string_loc()>, C<is_utf8_string_loclen()> のいずれかを使うことで
877 安全に行えます。
878
879 =head3 New Pad API
880
881 (新しいパッド API)
882
883 =begin original
884
885 Many new functions have been added to the API for manipulating lexical
886 pads. See L<perlapi/Pad Data Structures> for more information.
887
888 =end original
889
890 レキシカルパッドを操作するための多くの新しい関数が API に追加されました。
891 さらなる情報については L<perlapi/Pad Data Structures> を参照してください。
892
893 =head2 Changes to Special Variables
894
895 (特殊変数に関する変更)
896
897 =head3 C<$$> can be assigned to
898
899 (C<$$> は代入可能に)
900
901 =begin original
902
903 C<$$> was made read-only in Perl 5.8.0. But only sometimes: C<local $$>
904 would make it writable again. Some CPAN modules were using C<local $$> or
905 XS code to bypass the read-only check, so there is no reason to keep C<$$>
906 read-only. (This change also allowed a bug to be fixed while maintaining
907 backward compatibility.)
908
909 =end original
910
911 C<$$> は Perl 5.8.0 で読み込みせんようになりました。
912 しかしときどき: C<local $$> で再び書き込み可能になることがあります。
913 CPAN モジュールによっては読み込み専用のチェックを回避するために
914 C<local $$> や XS コードを使っているものもあるので、C<$$> よ読み込み専用に
915 保っておく理由がありません。
916 (この変更はまた、過去互換性を維持する間に修正するべきバグを許します。)
917
918 =head3 C<$^X> converted to an absolute path on FreeBSD, OS X and Solaris
919
920 (FreeBSD, OS X, Solaris でも C<$^X> が絶対パスに変換されるように)
921
922 =begin original
923
924 C<$^X> is now converted to an absolute path on OS X, FreeBSD (without
925 needing F</proc> mounted) and Solaris 10 and 11. This augments the
926 previous approach of using F</proc> on Linux, FreeBSD and NetBSD
927 (in all cases, where mounted).
928
929 =end original
930
931 C<$^X> は、OS X、(F</proc> をマウントする必要のない) FreeBSD、
932 Solaris 10 と 11 では絶対パスに変換されるようになりました。
933 これは Linux, FreeBSD, NetBSD で(マウントされているときに)
934 F</proc> を使うという以前の手法を拡大します。
935
936 =begin original
937
938 This makes relocatable perl installations more useful on these platforms.
939 (See "Relocatable @INC" in F<INSTALL>)
940
941 =end original
942
943 これにより、これらのプラットフォームでの再配置可能な perl インストールが
944 より便利になります。
945 (F<INSTALL> の "Relocatable @INC" を参照してください。)
946
947 =head2 Debugger Changes
948
949 (デバッガの変更)
950
951 =head3 Features inside the debugger
952
953 (デバッガ内部の機能)
954
955 =begin original
956
957 The current Perl's L<feature> bundle is now enabled for commands entered
958 in the interactive debugger.
959
960 =end original
961
962 現在の Perl の L<feature> バンドルは、対話的デバッガで入力されたコマンドで
963 有効になるようになりました。
964
965 =head3 New option for the debugger's B<t> command
966
967 (デバッガの B<t> コマンドの新しいオプション)
968
969 =begin original
970
971 The B<t> command in the debugger, which toggles tracing mode, now
972 accepts a numeric argument that determines how many levels of subroutine
973 calls to trace.
974
975 =end original
976
977 トレースモードをトグルするデバッガの B<t> コマンドは、サブルーチン
978 呼び出しを何レベルまでトレースするかを決定する数値引数を
979 受け付けるようになりました。
980
981 =head3 C<enable> and C<disable>
982
983 (C<enable> と C<disable>)
984
985 =begin original
986
987 The debugger now has C<disable> and C<enable> commands for disabling
988 existing breakpoints and re-enabling them. See L<perldebug>.
989
990 =end original
991
992 デバッガに、すでに有るブレークポイントを無効にしたり、再び有効に
993 したりするためのC<disable> コマンドと C<enable> コマンドが追加されました。
994 L<perldebug> を参照してください。
995
996 =head3 Breakpoints with file names
997
998 (ファイル名付きのブレークポイント)
999
1000 =begin original
1001
1002 The debugger's "b" command for setting breakpoints now allows a line
1003 number to be prefixed with a file name. See
1004 L<perldebug/"b [file]:[line] [condition]">.
1005
1006 =end original
1007
1008 ブレークポイントを設定するためのデバッガの "b" コマンドは、ファイル名の
1009 後ろに付ける行番号を受け付けるようになりました。
1010 L<perldebug/"b [file]:[line] [condition]"> を参照してください。
1011
1012 =head2 The C<CORE> Namespace
1013
1014 (C<CORE> 名前空間)
1015
1016 =head3 The C<CORE::> prefix
1017
1018 (C<CORE::> 前置詞)
1019
1020 =begin original
1021
1022 The C<CORE::> prefix can now be used on keywords enabled by
1023 L<feature.pm|feature>, even outside the scope of C<use feature>.
1024
1025 =end original
1026
1027 C<CORE::> 前置詞は、たとえ C<use feature> スコープの外側でも、
1028 L<feature.pm|feature> で有効になるキーワードで使われるようになりました。
1029
1030 =head3 Subroutines in the C<CORE> namespace
1031
1032 (C<CORE> 名前空間のサブルーチン)
1033
1034 =begin original
1035
1036 Many Perl keywords are now available as subroutines in the CORE namespace.
1037 This allows them to be aliased:
1038
1039 =end original
1040
1041 多くの Perl キーワードが CORE 名前空間で利用可能になりました。
1042 これにより以下のように別名にできるようになります:
1043
1044 BEGIN { *entangle = \&CORE::tie }
1045 entangle $variable, $package, @args;
1046
1047 =begin original
1048
1049 And for prototypes to be bypassed:
1050
1051 =end original
1052
1053 そしてプロトタイプを回避するには:
1054
1055 sub mytie(\[%$*@]$@) {
1056 my ($ref, $pack, @args) = @_;
1057 ... do something ...
1058 goto &CORE::tie;
1059 }
1060
1061 =begin original
1062
1063 Some of these cannot be called through references or via C<&foo> syntax,
1064 but must be called as barewords.
1065
1066 =end original
1067
1068 これらの一部はリファレンスや C<&foo> 文法では呼び出すことができず、
1069 裸の単語で呼び出さなければなりません。
1070
1071 =begin original
1072
1073 See L<CORE> for details.
1074
1075 =end original
1076
1077 詳しくは L<CORE> を参照してください。
1078
1079 =head2 Other Changes
1080
1081 (その他の変更)
1082
1083 =head3 Anonymous handles
1084
1085 (無名ハンドル)
1086
1087 =begin original
1088
1089 Automatically generated file handles are now named __ANONIO__ when the
1090 variable name cannot be determined, rather than $__ANONIO__.
1091
1092 =end original
1093
1094 変数名が決定できないときに自動的に生成されるファイルハンドルの名前は
1095 $__ANONIO__ ではなく __ANONIO__ になりました。
1096
1097 =head3 Autoloaded sort Subroutines
1098
1099 (ソートサブルーチンがオートロードされるように)
1100
1101 =begin original
1102
1103 Custom sort subroutines can now be autoloaded [perl #30661]:
1104
1105 =end original
1106
1107 カスタムソートサブルーチンはオートロードされるようになりました
1108 [perl #30661]:
1109
1110 sub AUTOLOAD { ... }
1111 @sorted = sort foo @list; # uses AUTOLOAD
1112
1113 =head3 C<continue> no longer requires the "switch" feature
1114
1115 (C<continue> には "switch" は不要に)
1116
1117 =begin original
1118
1119 The C<continue> keyword has two meanings. It can introduce a C<continue>
1120 block after a loop, or it can exit the current C<when> block. Up till now,
1121 the latter meaning was only valid with the "switch" feature enabled, and
1122 was a syntax error otherwise. Since the main purpose of feature.pm is to
1123 avoid conflicts with user-defined subroutines, there is no reason for
1124 C<continue> to depend on it.
1125
1126 =end original
1127
1128 C<continue> キーワードには二つの意味があります。
1129 ループの後に C<continue> ブロックを導入する意味と、現在の C<when> ブロックを
1130 出る意味です。
1131 今まで、後者の意味は "switch" 機能が有効の場合にのみ正当で、さもなければ
1132 文法エラーでした。
1133 feature.pm の主な目的はユーザー定義サブルーチンとの衝突を避けることなので、
1134 C<continue> がこれに依存している意味はありません。
1135
1136 =head3 DTrace probes for interpreter phase change
1137
1138 (インタプリタフェーズ変更のための DTrace プローブ)
1139
1140 =begin original
1141
1142 The C<phase-change> probes will fire when the interpreter's phase
1143 changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
1144 the new phase name; C<arg1> is the old one. This is useful mostly
1145 for limiting your instrumentation to one or more of: compile time,
1146 run time, destruct time.
1147
1148 =end original
1149
1150 C<phase-change> プローブは、C<${^GLOBAL_PHASE}> 変数を
1151 追跡することによって、インタプリタのフェーズが変わったときに起動されます。
1152 C<arg0> は新しいフェーズ名です; C<arg1> は古いフェーズ名です。
1153 これはコンパイル時、実行時、破壊時に装備を制限するために普通は有用です。
1154
1155 =head3 C<__FILE__()> Syntax
1156
1157 (C<__FILE__()> 文法)
1158
1159 =begin original
1160
1161 The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
1162 with an empty pair of parentheses after them. This makes them parse the
1163 same way as C<time>, C<fork> and other built-in functions.
1164
1165 =end original
1166
1167 C<__FILE__>, C<__LINE__>, C<__PACKAGE__> トークンは、後ろに空のかっこの
1168 組を書けるようになりました。
1169 これにより C<time>, C<fork> やその他の組み込み関数と同じ方法で
1170 パースできるようになります。
1171
1172 =head3 The C<\$> prototype accepts any scalar lvalue
1173
1174 (C<\$> プロトタイプは任意のスカラ左辺値を受け付けるように)
1175
1176 =begin original
1177
1178 The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
1179 argument. Previously they only accepted scalars beginning with C<$> and
1180 hash and array elements. This change makes them consistent with the way
1181 the built-in C<read> and C<recv> functions (among others) parse their
1182 arguments. This means that one can override the built-in functions with
1183 custom subroutines that parse their arguments the same way.
1184
1185 =end original
1186
1187 C<\$> と C<\[$]> のサブルーチンプロトタイプは任意のスカラ左辺値引数を
1188 受け付けるようになりました。
1189 以前は C<$> で始まるスカラとハッシュおよび配列の要素のみを
1190 受け付けていました。
1191 この変更により組み込みの C<read> 関数と C<recv> 関数が(特に)引数を
1192 パースする方法と一貫性があるようになります。
1193 これは、同じ方法で引数をパースするカスタムサブルーチンで組み込み関数を
1194 オーバーライドできることを意味します。
1195
1196 =head3 C<_> in subroutine prototypes
1197
1198 (サブルーチンプロトタイプの C<_>)
1199
1200 =begin original
1201
1202 The C<_> character in subroutine prototypes is now allowed before C<@> or
1203 C<%>.
1204
1205 =end original
1206
1207 サブルーチンプロトタイプの C<_> 文字は C<@> や C<%> の前に
1208 使えるようになりました。
1209
1210 =head1 Security
1211
1212 (セキュリティ)
1213
1214 =head2 Use C<is_utf8_char_buf()> and not C<is_utf8_char()>
1215
1216 (C<is_utf8_char()> ではなく C<is_utf8_char_buf()> を使う)
1217
1218 =begin original
1219
1220 The latter function is now deprecated because its API is insufficient to
1221 guarantee that it doesn't read (up to 12 bytes in the worst case) beyond
1222 the end of its input string. See
1223 L<is_utf8_char_buf()|/Added is_utf8_char_buf()>.
1224
1225 =end original
1226
1227 後者の関数は、API が入力文字列の末尾を超えて(最悪の場合最大 12 バイト)
1228 読み込まないことを保証できないので非推奨になりました。
1229 L<is_utf8_char_buf()|/Added is_utf8_char_buf()> を参照してください。
1230
1231 =head2 Malformed UTF-8 input could cause attempts to read beyond the end of the buffer
1232
1233 (不正な UTF-8 入力がバッファの末尾を超えて読み込もうとすることがある)
1234
1235 =begin original
1236
1237 Two new XS-accessible functions, C<utf8_to_uvchr_buf()> and
1238 C<utf8_to_uvuni_buf()> are now available to prevent this, and the Perl
1239 core has been converted to use them.
1240 See L</Internal Changes>.
1241
1242 =end original
1243
1244 Two new XS-accessible functions, C<utf8_to_uvchr_buf()> and
1245 C<utf8_to_uvuni_buf()> are now available to prevent this, and the Perl
1246 core has been converted to use them.
1247 See L</Internal Changes>.
1248 (TBT)
1249
1250 =head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
1251
1252 (GLOB_ALTDIRFUNC での C<File::Glob::bsd_glob()> のメモリエラー (CVE-2011-2728))
1253
1254 =begin original
1255
1256 Calling C<File::Glob::bsd_glob> with the unsupported flag
1257 GLOB_ALTDIRFUNC would cause an access violation / segfault. A Perl
1258 program that accepts a flags value from an external source could expose
1259 itself to denial of service or arbitrary code execution attacks. There
1260 are no known exploits in the wild. The problem has been corrected by
1261 explicitly disabling all unsupported flags and setting unused function
1262 pointers to null. Bug reported by Clément Lecigne.
1263
1264 =end original
1265
1266 未対応フラグ GLOB_ALTDIRFUNC 付きで C<File::Glob::bsd_glob> を呼び出すと
1267 アクセス違反/セグメンテーションフォルトを引き起こすことがありました。
1268 外部ソースからフラグの値を受け付ける Perl プログラムはサービス不能攻撃や
1269 任意コード実行攻撃に晒されるかもしれません。
1270 今のところ知られている攻撃はありません。
1271 この問題は、未対応フラグを明示的に無効にして、未使用関数のポインタを
1272 null にすることで修正されました。
1273 バグは ClE<eacute>ment Lecigne によって報告されました。
1274
1275 =head2 Privileges are now set correctly when assigning to C<$(>
1276
1277 (C<$(> への代入時に権限が適切に設定されるように)
1278
1279 =begin original
1280
1281 A hypothetical bug (probably non-exploitable in practice) due to the
1282 incorrect setting of the effective group ID while setting C<$(> has been
1283 fixed. The bug would only have affected systems that have C<setresgid()>
1284 but not C<setregid()>, but no such systems are known of.
1285
1286 =end original
1287
1288 C<$(> の設定中の有効グループ ID の設定が正しくないことによる仮説上の
1289 (おそらく実際には攻撃できない)バグが修正されました。
1290 このバグは C<setresgid()> はあるけれども C<setregid()> がないシステムにのみ
1291 影響を与えますが、そのようなシステムは知られていません。
1292
1293 =head1 Deprecations
1294
1295 (非推奨)
1296
1297 =head2 Don't read the Unicode data base files in F<lib/unicore>
1298
1299 (F<lib/unicore> にある Unicode データベースファイルは読み込まない)
1300
1301 =begin original
1302
1303 It is now deprecated to directly read the Unicode data base files.
1304 These are stored in the F<lib/unicore> directory. Instead, you should
1305 use the new functions in L<Unicode::UCD>. These provide a stable API,
1306 and give complete information.
1307
1308 =end original
1309
1310 Unicode データベースファイルを直接読むのは非推奨になりました。
1311 これらは F<lib/unicore> ディレクトリに補完されています。
1312 代わりに、L<Unicode::UCD> の新しい関数を使うべきです。
1313 これらは安定した API を提供し、完全な情報を得られます。
1314
1315 =begin original
1316
1317 Perl may at some point in the future change or remove the files. The
1318 file most likely for applications to have used is
1319 F<lib/unicore/ToDigit.pl>. L<Unicode::UCD/prop_invmap()> can be used to
1320 get at its data instead.
1321
1322 =end original
1323
1324 Perl は将来のいずれかの時点でファイルを変更または削除するかもしれません。
1325 アプリケーションから一番使われていたであろうファイルは
1326 F<lib/unicore/ToDigit.pl> です。
1327 代わりにこのデータを得るために L<Unicode::UCD/prop_invmap()> が使えます。
1328
1329 =head2 XS functions C<is_utf8_char()>, C<utf8_to_uvchr()> and
1330 C<utf8_to_uvuni()>
1331
1332 (XS 関数 C<is_utf8_char()>, C<utf8_to_uvchr()>, C<utf8_to_uvuni()>)
1333
1334 =begin original
1335
1336 This function is deprecated because it could read beyond the end of the
1337 input string. Use the new L<is_utf8_char_buf()|/Added is_utf8_char_buf()>,
1338 C<utf8_to_uvchr_buf()> and C<utf8_to_uvuni_buf()> instead.
1339
1340 =end original
1341
1342 この関数は、入力文字列の末尾を超えて読み込むかもしれないので、
1343 非推奨になりました。
1344 代わりに新しい L<is_utf8_char_buf()|/Added is_utf8_char_buf()>,
1345 C<utf8_to_uvchr_buf()>, C<utf8_to_uvuni_buf()> を使ってください。
1346
1347 =head1 Future Deprecations
1348
1349 (将来の非推奨)
1350
1351 =begin original
1352
1353 This section serves as a notice of features that are I<likely> to be
1354 removed or L<deprecated|perlpolicy/deprecated> in the next release of
1355 perl (5.18.0). If your code depends on these features, you should
1356 contact the Perl 5 Porters via the L<mailing
1357 list|http://lists.perl.org/list/perl5-porters.html> or L<perlbug> to
1358 explain your use case and inform the deprecation process.
1359
1360 =end original
1361
1362 この章は、次のリリースの perl (5.18.0) で I<おそらく> 削除されるか
1363 L<非推奨|perlpolicy/deprecated> になる機能を示します。
1364 あなたのコードがこれらの機能に依存しているなら、あなたのユースケースを
1365 説明して非推奨プロセスに知らせるために、
1366 L<メーリングリスト|http://lists.perl.org/list/perl5-porters.html> か
1367 L<perlbug> で Perl 5 Porters に知らせるべきです。
1368
1369 =head2 Core Modules
1370
1371 (コアモジュール)
1372
1373 =begin original
1374
1375 These modules may be marked as deprecated I<from the core>. This only
1376 means that they will no longer be installed by default with the core
1377 distribution, but will remain available on the CPAN.
1378
1379 =end original
1380
1381 これらのモジュールは I<コアからは> 非推奨としてマークされました。
1382 これはコア配布でデフォルトではインストールされなくなるというだけで、
1383 CPAN からは利用可能のままです。
1384
1385 =over
1386
1387 =item *
1388
1389 CPANPLUS
1390
1391 =item *
1392
1393 Filter::Simple
1394
1395 =item *
1396
1397 PerlIO::mmap
1398
1399 =item *
1400
1401 Pod::Parser, Pod::LaTeX
1402
1403 =item *
1404
1405 SelfLoader
1406
1407 =item *
1408
1409 Text::Soundex
1410
1411 =item *
1412
1413 Thread.pm
1414
1415 =back
1416
1417 =head2 Platforms with no supporting programmers:
1418
1419 (サポートするプログラマがいないプラットフォーム)
1420
1421 =begin original
1422
1423 These platforms will probably have their
1424 special build support removed during the
1425 5.17.0 development series.
1426
1427 =end original
1428
1429 以下のプラットフォームはおそらく 5.17.0 開発シリーズの間に独自のビルド
1430 サポートが削除されます。
1431
1432 =over
1433
1434 =item *
1435
1436 BeOS
1437
1438 =item *
1439
1440 djgpp
1441
1442 =item *
1443
1444 dgux
1445
1446 =item *
1447
1448 EPOC
1449
1450 =item *
1451
1452 MPE/iX
1453
1454 =item *
1455
1456 Rhapsody
1457
1458 =item *
1459
1460 UTS
1461
1462 =item *
1463
1464 VM/ESA
1465
1466 =back
1467
1468 =head2 Other Future Deprecations
1469
1470 (その他の将来の非推奨)
1471
1472 =over
1473
1474 =item *
1475
1476 =begin original
1477
1478 Swapping of $< and $>
1479
1480 =end original
1481
1482 $< と $> の交換
1483
1484 =begin original
1485
1486 For more information about this future deprecation, see L<the relevant RT
1487 ticket|https://rt.perl.org/rt3/Ticket/Display.html?id=96212>.
1488
1489 =end original
1490
1491 この将来の非推奨に関するさらなる情報については、
1492 L<関連する RT チケット|https://rt.perl.org/rt3/Ticket/Display.html?id=96212> を
1493 参照してください。
1494
1495 =item *
1496
1497 sfio, stdio
1498
1499 =item *
1500
1501 =begin original
1502
1503 Unescaped literal C<< "{" >> in regular expressions.
1504
1505 =end original
1506
1507 正規表現中のエスケープされていないリテラルの C<< "{" >>。
1508
1509 =begin original
1510
1511 It is planned starting in v5.20 to require a literal C<"{"> to be
1512 escaped by, for example, preceding it with a backslash. In v5.18, a
1513 deprecated warning message will be emitted for all such uses. Note that
1514 this only affects patterns which are to match a literal C<"{">. Other
1515 uses of this character, such as part of a quantifier or sequence like in
1516 the ones below are completely unaffected:
1517
1518 =end original
1519
1520 v5.20 から、リテラルの C<"{"> は、例えばバックスラッシュを前置することで、
1521 エスケープする必要があるようにすることが計画されています。
1522 v5.18 では、このような使用全てで警告が出力されます。
1523 これはリテラルな C<"{"> にマッチングするパターンにのみ影響を与えることに
1524 注意してください。
1525 量指定子の一部や、以下のシーケンスのような、その他のこの文字の使用には
1526 全く影響を与えません:
1527
1528 /foo{3,5}/
1529 /\p{Alphabetic}/
1530 /\N{DIGIT ZERO}
1531
1532 =begin original
1533
1534 The removal of this will allow extensions to pattern syntax, and better
1535 error checking of existing syntax. See L<perlre/Quantifiers> for an
1536 example.
1537
1538 =end original
1539
1540 この除去によって、パターン文法の拡張や、既にある文法のよりよいエラーチェックが
1541 可能になります。
1542 例については L<perlre/Quantifiers> を参照してください。
1543
1544 =back
1545
1546 =head1 Incompatible Changes
1547
1548 (互換性のない変更)
1549
1550 =head2 Special blocks called in void context
1551
1552 (特殊ブロックは無効コンテキストで呼び出されるように)
1553
1554 =begin original
1555
1556 Special blocks (C<BEGIN>, C<CHECK>, C<INIT>, C<UNITCHECK>, C<END>) are now
1557 called in void context. This avoids wasteful copying of the result of the
1558 last statement [perl #108794].
1559
1560 =end original
1561
1562 特殊ブロック (C<BEGIN>, C<CHECK>, C<INIT>, C<UNITCHECK>, C<END>) は
1563 無効コンテキストで呼び出されるようになりました。。
1564 これにより、最後の行の結果を無駄にコピーすることを防げます [perl #108794]。
1565
1566 =head2 The C<overloading> pragma and regexp objects
1567
1568 (C<overloading> プラグマと正規表現オブジェクト)
1569
1570 =begin original
1571
1572 With C<no overloading>, regular expression objects returned by C<qr//> are
1573 now stringified as "Regexp=REGEXP(0xbe600d)" instead of the regular
1574 expression itself [perl #108780].
1575
1576 =end original
1577
1578 C<no overloading> のとき、 C<qr//> によって返される正規表現オブジェクトは
1579 正規表現自体ではなく、"Regexp=REGEXP(0xbe600d)" として
1580 文字列化されるようになりました。
1581
1582 =head2 Two XS typemap Entries removed
1583
1584 (二つの XS typemap エントリを削除)
1585
1586 =begin original
1587
1588 Two presumably unused XS typemap entries have been removed from the
1589 core typemap: T_DATAUNIT and T_CALLBACK. If you are, against all odds,
1590 a user of these, please see the instructions on how to regain them
1591 in L<perlxstypemap>.
1592
1593 =end original
1594
1595 おそらく使われていない二つの XS typemap エントリ(T_DATAUNIT と T_CALLBACK)が
1596 コア typemap から削除されました。
1597 もしあなたが、あらゆる予想を覆して、これらを使っているなら、
1598 これらを復活させる方法を記してある L<perlxstypemap> を参照してください。
1599
1600 =head2 Unicode 6.1 has incompatibilities with Unicode 6.0
1601
1602 (Unicode 6.1 は Unicode 6.0 と互換性がない)
1603
1604 =begin original
1605
1606 These are detailed in L</Supports (almost) Unicode 6.1> above.
1607 You can compile this version of Perl to use Unicode 6.0. See
1608 L<perlunicode/Hacking Perl to work on earlier Unicode versions (for very serious hackers only)>.
1609
1610 =end original
1611
1612 この詳細は上述の L</Supports (almost) Unicode 6.1> にあります。
1613 このバージョンの Perl を Unicode 6.0 を使ってコンパイルすることも出来ます。
1614 L<perlunicode/Hacking Perl to work on earlier Unicode versions (for very serious hackers only)> を
1615 参照してください。
1616
1617 =head2 Borland compiler
1618
1619 (Borland コンパイラ)
1620
1621 =begin original
1622
1623 All support for the Borland compiler has been dropped. The code had not
1624 worked for a long time anyway.
1625
1626 =end original
1627
1628 Borland コンパイラ対応が全て削除されました。
1629 どちらにしろコードは長い間動作していませんでした。
1630
1631 =head2 Certain deprecated Unicode properties are no longer supported by default
1632
1633 (いくつかの非推奨の Unicode 特性がデフォルトではサポート外に)
1634
1635 =begin original
1636
1637 Perl should never have exposed certain Unicode properties that are used
1638 by Unicode internally and not meant to be publicly available. Use of
1639 these has generated deprecated warning messages since Perl 5.12. The
1640 removed properties are Other_Alphabetic,
1641 Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend,
1642 Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and
1643 Other_Uppercase.
1644
1645 =end original
1646
1647 Perl は、Unicode が内部で使って公開するつもりがないいくつかの Unicode 特性を
1648 暴露するべきではありません。
1649 Perl 5.12 以降これらを使うと警告が出力されていました。
1650 削除された特性は、Other_Alphabetic,
1651 Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend,
1652 Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math,
1653 Other_Uppercase です。
1654
1655 =begin original
1656
1657 Perl may be recompiled to include any or all of them; instructions are
1658 given in
1659 L<perluniprops/Unicode character properties that are NOT accepted by Perl>.
1660
1661 =end original
1662
1663 これらの一部または全部を含む形で Perl を再コンパイルすることもできます;
1664 手順は
1665 L<perluniprops/Unicode character properties that are NOT accepted by Perl> に
1666 あります。
1667
1668 =head2 Dereferencing IO thingies as typeglobs
1669
1670 (IO 系のものを型グロブとしてデリファレンス)
1671
1672 =begin original
1673
1674 The C<*{...}> operator, when passed a reference to an IO thingy (as in
1675 C<*{*STDIN{IO}}>), creates a new typeglob containing just that IO object.
1676 Previously, it would stringify as an empty string, but some operators would
1677 treat it as undefined, producing an "uninitialized" warning.
1678 Now it stringifies as __ANONIO__ [perl #96326].
1679
1680 =end original
1681
1682 C<*{...}> 演算子は、(C<*{*STDIN{IO}}> のような) IO 系へのリファレンスを
1683 渡すと、IO オブジェクト自体を含む新しい型グロブを作成します。
1684 以前は、空文字列として文字列化していましたが、一部の演算子はこれを
1685 未定義として扱い、"uninitialized" 警告を出力していました。
1686 今では __ANONIO__ と文字列化されます [perl #96326]。
1687
1688 =head2 User-defined case changing operations
1689
1690 (ユーザー定義大文字変更操作)
1691
1692 =begin original
1693
1694 This feature was deprecated in Perl 5.14, and has now been removed.
1695 The CPAN module L<Unicode::Casing> provides better functionality without
1696 the drawbacks that this feature had, as are detailed in the 5.14
1697 documentation:
1698 L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
1699
1700 =end original
1701
1702 この機能は Perl 5.14 で非推奨となり、今回削除されました。
1703 CPAN モジュール L<Unicode::Casing> は、5.14 の文書に詳細に記されている通り、
1704 この機能が持っていた欠点なしに、よりよい機能を提供します:
1705 L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
1706
1707 =head2 XSUBs are now 'static'
1708
1709 (XSUB は 'static' に)
1710
1711 =begin original
1712
1713 XSUB C functions are now 'static', that is, they are not visible from
1714 outside the compilation unit. Users can use the new C<XS_EXTERNAL(name)>
1715 and C<XS_INTERNAL(name)> macros to pick the desired linking behaviour.
1716 The ordinary C<XS(name)> declaration for XSUBs will continue to declare
1717 non-'static' XSUBs for compatibility, but the XS compiler,
1718 C<ExtUtils::ParseXS> (C<xsubpp>) will emit 'static' XSUBs by default.
1719 C<ExtUtils::ParseXS>'s behaviour can be reconfigured from XS using the
1720 C<EXPORT_XSUB_SYMBOLS> keyword. See L<perlxs> for details.
1721
1722 =end original
1723
1724 XSUB C 関数は 'static' になりました; つまり、コンパイル単位の外側からは
1725 見えなくなりました。
1726 ユーザーは求めるリンクの振る舞いを得るために新しい
1727 C<XS_EXTERNAL(name)> マクロと C<XS_INTERNAL(name)> マクロを使えます。
1728 XSUB の通常の C<XS(name)> 宣言は互換性のために非 'static' な XSUB を
1729 宣言するままですが、XS コンパイラ C<ExtUtils::ParseXS> (C<xsubpp>) は
1730 デフォルトでは 'static' XSUB を出力します。
1731 C<ExtUtils::ParseXS> の振る舞いは C<EXPORT_XSUB_SYMBOLS> キーワードを
1732 使った XS によって再設定できます。
1733 詳しくは L<perlxs> を参照してください。
1734
1735 =head2 Weakening read-only references
1736
1737 (読み込み専用の参照を弱くする)
1738
1739 =begin original
1740
1741 Weakening read-only references is no longer permitted. It should never
1742 have worked anyway, and in some cases could result in crashes.
1743
1744 =end original
1745
1746 読み込み専用の参照を弱くすることはできなくなりました。
1747 どちらにしても正しく動作しておらず、場合によってはクラッシュしていました。
1748
1749 =head2 Tying scalars that hold typeglobs
1750
1751 (型グロブを保持しているスカラの tie)
1752
1753 =begin original
1754
1755 Attempting to tie a scalar after a typeglob was assigned to it would
1756 instead tie the handle in the typeglob's IO slot. This meant that it was
1757 impossible to tie the scalar itself. Similar problems affected C<tied> and
1758 C<untie>: C<tied $scalar> would return false on a tied scalar if the last
1759 thing returned was a typeglob, and C<untie $scalar> on such a tied scalar
1760 would do nothing.
1761
1762 =end original
1763
1764 型グロブを代入された後のスカラを tie しようとすると、代わりに型グロブの
1765 IO スロットにあるハンドルが tie されます。
1766 これは、スカラ自身を tie することが不可能になると言うことを意味します。
1767 似たような問題は C<tied> と C<untie> に影響を与えます: C<tied $scalar> は
1768 最後に返されたものが型グロブの場合は tie されたスカラに偽を返し、
1769 そのような tie されたスカラに C<untie $scalar> しても何も起きません。
1770
1771 =begin original
1772
1773 We fixed this problem before Perl 5.14.0, but it caused problems with some
1774 CPAN modules, so we put in a deprecation cycle instead.
1775
1776 =end original
1777
1778 私たちはこの問題を Perl 5.14.0 の前に修正しましたが、これは一部の
1779 CPAN モジュールに問題を引き起こすので、代わりに
1780 非推奨サイクルに入れることにしました。
1781
1782 =begin original
1783
1784 Now the deprecation has been removed and this bug has been fixed. So
1785 C<tie $scalar> will always tie the scalar, not the handle it holds. To tie
1786 the handle, use C<tie *$scalar> (with an explicit asterisk). The same
1787 applies to C<tied *$scalar> and C<untie *$scalar>.
1788
1789 =end original
1790
1791 今回非推奨は削除され、バグは修正されました。
1792 それで C<tie $scalar> は、スカラが保存しているハンドルではなく、スカラ自身を
1793 tie します。
1794 ハンドルを tie するには、C<tie *$scalar> を(明示的なアスタリスク付きで)
1795 使ってください。
1796 同じ内容は C<tied *$scalar> と C<untie *$scalar> にも適用されます。
1797
1798 =head2 IPC::Open3 no longer provides C<xfork()>, C<xclose_on_exec()>
1799 and C<xpipe_anon()>
1800
1801 (IPC::Open3 は C<xfork()>, C<xclose_on_exec()>, C<xpipe_anon()> を提供しません)
1802
1803 =begin original
1804
1805 All three functions were private, undocumented and unexported. They do
1806 not appear to be used by any code on CPAN. Two have been inlined and one
1807 deleted entirely.
1808
1809 =end original
1810
1811 これら三つの関数はプライベートなもので文書化されておらずエクスポートも
1812 されていません。
1813 これらは CPAN のどのコードからも使われていません。
1814 二つはインライン化され、一つは完全に削除されました。
1815
1816 =head2 C<$$> no longer caches PID
1817
1818 (C<$$> は PID をキャッシュしません)
1819
1820 =begin original
1821
1822 Previously, if one called fork(3) from C, Perl's
1823 notion of C<$$> could go out of sync with what getpid() returns. By always
1824 fetching the value of C<$$> via getpid(), this potential bug is eliminated.
1825 Code that depends on the caching behavior will break. As described in
1826 L<Core Enhancements|/C<$$> can be assigned to>,
1827 C<$$> is now writable, but it will be reset during a
1828 fork.
1829
1830 =end original
1831
1832 以前は、C から fork(3) を呼び出すと、Perl の C<$$> の概念は getpid() が
1833 返すものと同期しなくなることがありました。
1834 常に getpid() 経由で C<$$> の値を取得することで、この潜在的なバグは
1835 修正されました。
1836 キャッシュする振る舞いに依存しているコードは動かなくなります。
1837 L<Core Enhancements|/C<$$> can be assigned to> で記述したように、
1838 C<$$> は書き込み可能になりましたが、fork 中はリセットされます。
1839
1840 =head2 C<$$> and C<getppid()> no longer emulate POSIX semantics under LinuxThreads
1841
1842 (C<$$> と C<getppid()> は LinuxThreads のもとで POSIX の意味論をエミュレートしません)
1843
1844 =begin original
1845
1846 The POSIX emulation of C<$$> and C<getppid()> under the obsolete
1847 LinuxThreads implementation has been removed.
1848 This only impacts users of Linux 2.4 and
1849 users of Debian GNU/kFreeBSD up to and including 6.0, not the vast
1850 majority of Linux installations that use NPTL threads.
1851
1852 =end original
1853
1854 古い LinuxThreads 実装のもとでの C<$$> と C<getppid()> の POSIX
1855 エミュレーションは削除されました。
1856 これは Linux 2.4 のユーザーとバージョン 6.0 までの Debian GNU/kFreeBSD の
1857 ユーザーにのみ影響があり、NPTL スレッドを使っている圧倒的多数の
1858 Linux インストールには影響はありません。
1859
1860 =begin original
1861
1862 This means that C<getppid()>, like C<$$>, is now always guaranteed to
1863 return the OS's idea of the current state of the process, not perl's
1864 cached version of it.
1865
1866 =end original
1867
1868 これは、C<getppid()> は C<$$> と同様に、perl がキャッシュしたものではなく
1869 OS が考えているプロセスの現在の状態を常に返すと言うことを意味まします。
1870
1871 =begin original
1872
1873 See the documentation for L<$$|perlvar/$$> for details.
1874
1875 =end original
1876
1877 詳しくは L<$$|perlvar/$$> の文書を参照してください。
1878
1879 =head2 C<< $< >>, C<< $> >>, C<$(> and C<$)> are no longer cached
1880
1881 (C<< $< >>, C<< $> >>, C<$(>, C<$)> はキャッシュされません)
1882
1883 =begin original
1884
1885 Similarly to the changes to C<$$> and C<getppid()>, the internal
1886 caching of C<< $< >>, C<< $> >>, C<$(> and C<$)> has been removed.
1887
1888 =end original
1889
1890 C<$$> および C<getppid()> の変更と同様に C<< $< >>, C<< $> >>, C<$(>,
1891 C<$)> の内部キャッシュも削除されました。
1892
1893 =begin original
1894
1895 When we cached these values our idea of what they were would drift out
1896 of sync with reality if someone (e.g., someone embedding perl) called
1897 C<sete?[ug]id()> without updating C<PL_e?[ug]id>. Having to deal with
1898 this complexity wasn't worth it given how cheap the C<gete?[ug]id()>
1899 system call is.
1900
1901 =end original
1902
1903 When we cached these values our idea of what they were would drift out
1904 of sync with reality if someone (e.g., someone embedding perl) called
1905 C<sete?[ug]id()> without updating C<PL_e?[ug]id>.
1906 この複雑性は C<gete?[ug]id()> の呼び出しコストの低さを考えると割に
1907 合いませんでした。
1908 (TBT)
1909
1910 =begin original
1911
1912 This change will break a handful of CPAN modules that use the XS-level
1913 C<PL_uid>, C<PL_gid>, C<PL_euid> or C<PL_egid> variables.
1914
1915 =end original
1916
1917 この変更により XS レベルの C<PL_uid>, C<PL_gid>, C<PL_euid>,
1918 C<PL_egid> 変数を使っている一握りの CPAN モジュールが動かなくなります。
1919
1920 =begin original
1921
1922 The fix for those breakages is to use C<PerlProc_gete?[ug]id()> to
1923 retrieve them (e.g. C<PerlProc_getuid()>), and not to assign to
1924 C<PL_e?[ug]id> if you change the UID/GID/EUID/EGID. There is no longer
1925 any need to do so since perl will always retrieve the up-to-date
1926 version of those values from the OS.
1927
1928 =end original
1929
1930 これを修正するには、値を得るのに (C<PerlProc_getuid()> のような)
1931 C<PerlProc_gete?[ug]id()> を使って、もし UID/GID/EUID/EGID を変更するなら
1932 C<PL_e?[ug]id> に代入しないことです。
1933 perl はこれらの値を常に OS から最新の値を取るようになったので、
1934 このようにする必要性はなくなっています。
1935
1936 =head2 Which Non-ASCII characters get quoted by C<quotemeta> and C<\Q> has changed
1937
1938 (C<quotemeta> と C<\Q> でクォートされる非 ASCII 文字の変更)
1939
1940 =begin original
1941
1942 This is unlikely to result in a real problem, as Perl does not attach
1943 special meaning to any non-ASCII character, so it is currently
1944 irrelevant which are quoted or not. This change fixes bug [perl #77654] and
1945 bring Perl's behavior more into line with Unicode's recommendations.
1946 See L<perlfunc/quotemeta>.
1947
1948 =end original
1949
1950 Perl は非 ASCII 文字に特別な意味を割り振っていないために、これが実際の
1951 問題になるとは考えにくいので、今のところクォートされているかどうかは
1952 無関係です。
1953 この変更は [perl #77654] のバグを修正して、Perl の振る舞いを Unicode の
1954 要求により近いものにします。
1955 L<perlfunc/quotemeta> を参照してください。
1956
1957 =head1 Performance Enhancements
1958
1959 (性能改善)
1960
1961 =over
1962
1963 =item *
1964
1965 =begin original
1966
1967 Improved performance for Unicode properties in regular expressions
1968
1969 =end original
1970
1971 正規表現中の Unicode 特性の性能改善
1972
1973 =for comment Can this be compacted some? -- rjbs, 2012-02-20
1974
1975 Matching a code point against a Unicode property is now done via a
1976 binary search instead of linear. This means for example that the worst
1977 case for a 1000 item property is 10 probes instead of 1000. This
1978 inefficiency has been compensated for in the past by permanently storing
1979 in a hash the results of a given probe plus the results for the adjacent
1980 64 code points, under the theory that near-by code points are likely to
1981 be searched for. A separate hash was used for each mention of a Unicode
1982 property in each regular expression. Thus, C<qr/\p{foo}abc\p{foo}/>
1983 would generate two hashes. Any probes in one instance would be unknown
1984 to the other, and the hashes could expand separately to be quite large
1985 if the regular expression were used on many different widely-separated
1986 code points. This can lead to running out of memory in extreme cases.
1987 Now, however, there is just one hash shared by all instances of a given
1988 property. This means that if C<\p{foo}> is matched against "A" in one
1989 regular expression in a thread, the result will be known immediately to
1990 all regular expressions, and the relentless march of using up memory is
1991 slowed considerably.
1992
1993 =item *
1994
1995 =begin original
1996
1997 Version declarations with the C<use> keyword (e.g., C<use 5.012>) are now
1998 faster, as they enable features without loading F<feature.pm>.
1999
2000 =end original
2001
2002 (C<use 5.012> のような)C<use> キーワードのバージョン宣言は、
2003 F<feature.pm> を読み込むことなく機能を有効にするので、より
2004 速くなりました。
2005
2006 =item *
2007
2008 =begin original
2009
2010 C<local $_> is faster now, as it no longer iterates through magic that it
2011 is not going to copy anyway.
2012
2013 =end original
2014
2015 結局コピーされないマジックを反復しなくなったので、C<local $_> は
2016 早くなりました。
2017
2018 =item *
2019
2020 =begin original
2021
2022 Perl 5.12.0 sped up the destruction of objects whose classes define
2023 empty C<DESTROY> methods (to prevent autoloading), by simply not
2024 calling such empty methods. This release takes this optimisation a
2025 step further, by not calling any C<DESTROY> method that begins with a
2026 C<return> statement. This can be useful for destructors that are only
2027 used for debugging:
2028
2029 =end original
2030
2031 Perl 5.12.0 は(オートロードを防ぐために) 空の C<DESTROY> メソッドを
2032 定義しているクラスのオブジェクトを破壊するときに、単にそのような
2033 空メソッドを呼ばないようにすることで高速化しました。
2034 このリリースはこの最適化をさらに進めて、C<return> 文で始まる
2035 全ての C<DESTROY> メソッドを呼び出さなくなりました。
2036 これはデストラクタがデバッグのためだけに使われている場合に有用です:
2037
2038 use constant DEBUG => 1;
2039 sub DESTROY { return unless DEBUG; ... }
2040
2041 =begin original
2042
2043 Constant-folding will reduce the first statement to C<return;> if DEBUG
2044 is set to 0, triggering this optimisation.
2045
2046 =end original
2047
2048 DEBUG が 0 にセットされ、最適化が有効になっているなら、
2049 定数の畳み込みが C<return;> への最初の文に制限されるようになります。
2050
2051 =item *
2052
2053 =begin original
2054
2055 Assigning to a variable that holds a typeglob or copy-on-write scalar
2056 is now much faster. Previously the typeglob would be stringified or
2057 the copy-on-write scalar would be copied before being clobbered.
2058
2059 =end original
2060
2061 型グロブを補完している変数やコピーオンライトスカラ変数への代入は
2062 とても速くなりました。
2063 以前は型グロブは文字列化され、、コピーオンライトスカラ変数は上書きされる
2064 前にコピーされていました。
2065
2066 =item *
2067
2068 =begin original
2069
2070 Assignment to C<substr> in void context is now more than twice its
2071 previous speed. Instead of creating and returning a special lvalue
2072 scalar that is then assigned to, C<substr> modifies the original string
2073 itself.
2074
2075 =end original
2076
2077 無効コンテキストでの C<substr> への代入は以前より倍以上速くなりました。
2078 後で代入される特殊左辺値を作って返すのではなく、C<substr> 自身が
2079 元の文字列を変更します。
2080
2081 =item *
2082
2083 =begin original
2084
2085 C<substr> no longer calculates a value to return when called in void
2086 context.
2087
2088 =end original
2089
2090 C<substr> は、無効コンテキストで呼び出された場合は返す値を
2091 計算しなくなりました。
2092
2093 =item *
2094
2095 =begin original
2096
2097 Due to changes in L<File::Glob>, Perl's C<glob> function and its C<<
2098 <...> >> equivalent are now much faster. The splitting of the pattern
2099 into words has been rewritten in C, resulting in speed-ups of 20% in
2100 some cases.
2101
2102 =end original
2103
2104 L<File::Glob> の変更により、Perl の C<glob> 関数および、等価な
2105 C<< <...> >> はとても速くなりました。
2106 パターンから単語への分割は C で書き直されたので、場合によっては 20%
2107 高速化しました。
2108
2109 =begin original
2110
2111 This does not affect C<glob> on VMS, as it does not use File::Glob.
2112
2113 =end original
2114
2115 これは VMS の C<glob> には影響を与えません; File::Glob を
2116 使わないからです。
2117
2118 =item *
2119
2120 =begin original
2121
2122 The short-circuiting operators C<&&>, C<||>, and C<//>, when chained
2123 (such as C<$a || $b || $c>), are now considerably faster to short-circuit,
2124 due to reduced optree traversal.
2125
2126 =end original
2127
2128 短絡演算子 C<&&>, C<||>, and C<//> は (C<$a || $b || $c> のように)
2129 連結されたとき、大幅に速くなりました; 構文木をたどる量が減少したからです。
2130
2131 =item *
2132
2133 =begin original
2134
2135 The implementation of C<s///r> makes one fewer copy of the scalar's value.
2136
2137 =end original
2138
2139 C<s///r> の実装のスカラ値のコピーが一回減りました。
2140
2141 =item *
2142
2143 =begin original
2144
2145 C<study> is now a no-op.
2146
2147 =end original
2148
2149 C<study> は何もしなくなりました。
2150
2151 =item *
2152
2153 =begin original
2154
2155 Recursive calls to lvalue subroutines in lvalue scalar context use less
2156 memory.
2157
2158 =end original
2159
2160 左辺値スカラコンテキストでの左辺サブルーチンの再帰呼び出しのメモリ消費が
2161 少なくなりました。
2162
2163 =back
2164
2165 =head1 Modules and Pragmata
2166
2167 (モジュールとプラグマ)
2168
2169 =head2 Deprecated Modules
2170
2171 (非推奨のモジュール)
2172
2173 =over
2174
2175 =item L<Version::Requirements>
2176
2177 =begin original
2178
2179 Version::Requirements is now DEPRECATED, use L<CPAN::Meta::Requirements>,
2180 which is a drop-in replacement. It will be deleted from perl.git blead
2181 in v5.17.0.
2182
2183 =end original
2184
2185 Version::Requirements は非推奨となりました; 差し込み式の代替品である
2186 L<CPAN::Meta::Requirements> を使ってください。
2187 これは v5.17.0 の perl.git blead で削除されます。
2188
2189 =back
2190
2191 =head2 New Modules and Pragmata
2192
2193 (新しいモジュールとプラグマ)
2194
2195 =over 4
2196
2197 =item *
2198
2199 =begin original
2200
2201 L<arybase> -- this new module implements the C<$[> variable.
2202
2203 =end original
2204
2205 L<arybase> -- これは C<$[> 変数を実装する新しいモジュールです。
2206
2207 =item *
2208
2209 =begin original
2210
2211 C<PerlIO::mmap> 0.010 has been added to the Perl core.
2212
2213 =end original
2214
2215 C<PerlIO::mmap> 0.010 が Perl コアに追加されました。
2216
2217 =begin original
2218
2219 The C<mmap> PerlIO layer is no longer implemented by perl itself, but has
2220 been moved out into the new L<PerlIO::mmap> module.
2221
2222 =end original
2223
2224 C<mmap> PerlIO 層は perl 自身では実装されなくなり、新しい
2225 L<PerlIO::mmap> モジュールに外出しされました。
2226
2227 =back
2228
2229 =head2 Updated Modules and Pragmata
2230
2231 (更新されたモジュールとプラグマ)
2232
2233 =over 4
2234
2235 =item *
2236
2237 L<XXX> has been upgraded from version 0.69 to version 0.70.
2238
2239 =back
2240
2241 =head2 Removed Modules and Pragmata
2242
2243 (削除されたモジュールとプラグマ)
2244
2245 =begin original
2246
2247 As promised in Perl 5.14.0's release notes, the following modules have
2248 been removed from the core distribution, and if needed should be installed
2249 from CPAN instead.
2250
2251 =end original
2252
2253 Perl 5.14.0 のリリースノートで約束した通り、以下のモジュールがコア配布から
2254 削除されました; もし必要なら代わりに CPAN からインストールしてください。
2255
2256 =over
2257
2258 =item *
2259
2260 =begin original
2261
2262 C<Devel::DProf> has been removed from the Perl core. Prior version was
2263 20110228.00.
2264
2265 =end original
2266
2267 C<Devel::DProf> は Perl コアから削除されました。
2268 以前のバージョンは 20110228.00 でした。
2269
2270 =item *
2271
2272 =begin original
2273
2274 C<Shell> has been removed from the Perl core. Prior version was 0.72_01.
2275
2276 =end original
2277
2278 C<Shell> は Perl コアから削除されました。
2279 以前のバージョンは 0.72_01 でした。
2280
2281 =back
2282
2283 =head1 Documentation
2284
2285 (文書)
2286
2287 =head2 New Documentation
2288
2289 (新しい文書)
2290
2291 =head3 L<perldtrace>
2292
2293 =begin original
2294
2295 L<perldtrace> describes Perl's DTrace support, listing the provided probes
2296 and gives examples of their use.
2297
2298 =end original
2299
2300 L<perldtrace> は Perl の DTrace 対応について記述し、提供している
2301 プローブの一覧と使用例を提供します。
2302
2303 =head3 L<perlexperiment>
2304
2305 =begin original
2306
2307 This document is intended to provide a list of experimental features in
2308 Perl. It is still a work in progress.
2309
2310 =end original
2311
2312 この文書は Perl の実験的機能の一覧を提供することを意図しています。
2313 これはまだ作業中です。
2314
2315 =head3 L<perlootut>
2316
2317 =begin original
2318
2319 This a new OO tutorial. It focuses on basic OO concepts, and then recommends
2320 that readers choose an OO framework from CPAN.
2321
2322 =end original
2323
2324 これは新しい OO チュートリアルです。
2325 基本的な OO コンセプトに焦点を合わせ、読者が CPAN から OO フレームワークを
2326 選ぶことを推奨しています。
2327
2328 =head3 L<perlxstypemap>
2329
2330 =begin original
2331
2332 The new manual describes the XS typemapping mechanism in unprecedented
2333 detail and combines new documentation with information extracted from
2334 L<perlxs> and the previously unofficial list of all core typemaps.
2335
2336 =end original
2337
2338 この新しいマニュアルは、前例のないほど詳細に XS typemap 機構について記述し、
2339 新しい文書を L<perlxs> から抽出された情報および以前は非公式だった
2340 全てのコア typemap の一覧と結合します。
2341
2342 =head2 Changes to Existing Documentation
2343
2344 (既存の文書の変更)
2345
2346 =head3 L<perlapi>
2347
2348 =over 4
2349
2350 =item *
2351
2352 =begin original
2353
2354 The HV API has long accepted negative lengths to indicate that the key is
2355 in UTF8. Now this is documented.
2356
2357 =end original
2358
2359 HV API は長い間、キーが UTF8 であることを示すための負数の長さを
2360 受け付けていました。
2361 これが文書化されました。
2362
2363 =item *
2364
2365 =begin original
2366
2367 The C<boolSV()> macro is now documented.
2368
2369 =end original
2370
2371 C<boolSV()> が文書化されました。
2372
2373 =back
2374
2375 =head3 L<perlfunc>
2376
2377 =over 4
2378
2379 =item *
2380
2381 =begin original
2382
2383 C<dbmopen> treats a 0 mode as a special case, that prevents a nonexistent
2384 file from being created. This has been the case since Perl 5.000, but was
2385 never documented anywhere. Now the perlfunc entry mentions it
2386 [perl #90064].
2387
2388 =end original
2389
2390 C<dbmopen> はモード 0 を特殊な場合として扱い、この場合存在しないファイルを
2391 作成しません。
2392 これは Perl 5.000 からありましたが、どこにも文書化されていませんでした。
2393 perlfunc のエントリでこれに触れるようになりました [perl #90064]。
2394
2395 =item *
2396
2397 =begin original
2398
2399 As an accident of history, C<open $fh, "<:", ...> applies the default
2400 layers for the platform (C<:raw> on Unix, C<:crlf> on Windows), ignoring
2401 whatever is declared by L<open.pm|open>. This seems such a useful feature
2402 it has been documented in L<perlfunc|perlfunc/open> and L<open>.
2403
2404 =end original
2405
2406 歴史上の偶然により、C<open $fh, "<:", ...> はプラットフォームのデフォルト層
2407 (Unix では C<:raw>、Windows では C<:crlf>)を適用し、L<open.pm|open> で
2408 宣言されていたものを無視していました。
2409 これは有効な機能に思えるので、L<perlfunc|perlfunc/open> と L<open> に
2410 文書化されました。
2411
2412 =item *
2413
2414 =begin original
2415
2416 The entry for C<split> has been rewritten. It is now far clearer than
2417 before.
2418
2419 =end original
2420
2421 C<split> のエントリが書き直されました。
2422 以前より遥かに明確になりました。
2423
2424 =back
2425
2426 =head3 L<perlguts>
2427
2428 =over 4
2429
2430 =item *
2431
2432 =begin original
2433
2434 A new section, L<Autoloading with XSUBs|perlguts/Autoloading with XSUBs>,
2435 has been added, which explains the two APIs for accessing the name of the
2436 autoloaded sub.
2437
2438 =end original
2439
2440 オートロードされたサブルーチンの名前にアクセスするための二つの API に
2441 ついて説明した
2442 L<Autoloading with XSUBs|perlguts/Autoloading with XSUBs> という新しい
2443 章が追加されました。
2444
2445 =item *
2446
2447 =begin original
2448
2449 Some of the function descriptions in L<perlguts> were confusing, as it was
2450 not clear whether they referred to the function above or below the
2451 description. This has been clarified [perl #91790].
2452
2453 =end original
2454
2455 L<perlguts> のいくつかの関数の説明は混乱していて、説明の上に書いてある
2456 関数のことか下に書いてある関数のことかがはっきりしていませんでした。
2457 これは明確化されました [perl #91790]。
2458
2459 =back
2460
2461 =head3 L<perlobj>
2462
2463 =over 4
2464
2465 =item *
2466
2467 =begin original
2468
2469 This document has been rewritten from scratch, and its coverage of various OO
2470 concepts has been expanded.
2471
2472 =end original
2473
2474 この文書は最初から書き直され、様々な OO コンセプトの範囲が拡張されました。
2475
2476 =back
2477
2478 =head3 L<perlop>
2479
2480 =over 4
2481
2482 =item *
2483
2484 =begin original
2485
2486 Documentation of the smartmatch operator has been reworked and moved from
2487 perlsyn to perlop where it belongs.
2488
2489 =end original
2490
2491 スマートマッチング演算子の文書が書き直され、perlsyn から属する場所である
2492 perlopに移動しました。
2493
2494 =begin original
2495
2496 It has also been corrected for the case of C<undef> on the left-hand
2497 side. The list of different smart match behaviours had an item in the
2498 wrong place.
2499
2500 =end original
2501
2502 左側の C<undef> の場合も修正されました。
2503 スマートマッチングの振る舞いの違いの一覧は間違った位置のアイテムに
2504 ありました。
2505
2506 =item *
2507
2508 =begin original
2509
2510 Documentation of the ellipsis statement (C<...>) has been reworked and
2511 moved from perlop to perlsyn.
2512
2513 =end original
2514
2515 省略文 (C<...>) の文書が書き直され、perlop から perlsyn に移動しました。
2516
2517 =item *
2518
2519 =begin original
2520
2521 The explanation of bitwise operators has been expanded to explain how they
2522 work on Unicode strings (5.14.1).
2523
2524 =end original
2525
2526 ビット単位演算子の説明は、Unicode 文字列に対してどのように動作するかの
2527 説明が追加されました (5.14.1)。
2528
2529 =item *
2530
2531 =begin original
2532
2533 More examples for C<m//g> have been added (5.14.1).
2534
2535 =end original
2536
2537 C<m//g> に関するさらなる例が追加されました (5.14.1)。
2538
2539 =item *
2540
2541 =begin original
2542
2543 The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1).
2544
2545 =end original
2546
2547 C<<< <<\FOO >>> ヒヤドキュメント文法が追加されました (5.14.1)。
2548
2549 =back
2550
2551 =head3 L<perlpragma>
2552
2553 =over 4
2554
2555 =item *
2556
2557 =begin original
2558
2559 There is now a standard convention for naming keys in the C<%^H>,
2560 documented under L<Key naming|perlpragma/Key naming>.
2561
2562 =end original
2563
2564 C<%^H> のキーの命名に標準規則が定められ、
2565 L<Key naming|perlpragma/Key naming> で文書化されました。
2566
2567 =back
2568
2569 =head3 L<perlsec/Laundering and Detecting Tainted Data>
2570
2571 =over 4
2572
2573 =item *
2574
2575 =begin original
2576
2577 The example function for checking for taintedness contained a subtle
2578 error. C<$@> needs to be localized to prevent its changing this
2579 global's value outside the function. The preferred method to check for
2580 this remains L<Scalar::Util/tainted>.
2581
2582 =end original
2583
2584 汚染をチェックする例の関数に僅かなミスがありました。
2585 C<$@> は関数の外側でこのグローバルな値を変更されないようにローカル化する
2586 必要があります。
2587 これをチェックするための望ましいメソッドはやはり
2588 L<Scalar::Util/tainted> です。
2589
2590 =back
2591
2592 =head3 L<perllol>
2593
2594 =over
2595
2596 =item *
2597
2598 =begin original
2599
2600 L<perllol> has been expanded with examples using the new C<push $scalar>
2601 syntax introduced in Perl 5.14.0 (5.14.1).
2602
2603 =end original
2604
2605 L<perllol> は、Perl 5.14.0 で導入された新しい C<push $scalar> 文法を
2606 使った例が追加されました (5.14.1)。
2607
2608 =back
2609
2610 =head3 L<perlmod>
2611
2612 =over
2613
2614 =item *
2615
2616 =begin original
2617
2618 L<perlmod> now states explicitly that some types of explicit symbol table
2619 manipulation are not supported. This codifies what was effectively already
2620 the case [perl #78074].
2621
2622 =end original
2623
2624 L<perlmod> は明示的なシンボルテーブル操作のいくつかの種類は対応していない
2625 ことを明示的に記すようになりました。
2626 これは何が事実上すでに対応していないかを明文化しています [perl #78074]。
2627
2628 =back
2629
2630 =head3 L<perlpodstyle>
2631
2632 =over 4
2633
2634 =item *
2635
2636 =begin original
2637
2638 The tips on which formatting codes to use have been corrected and greatly
2639 expanded.
2640
2641 =end original
2642
2643 どのフォーマッティングコードを使うかの小技が修正され、大幅に
2644 拡張されました。
2645
2646 =item *
2647
2648 =begin original
2649
2650 There are now a couple of example one-liners for previewing POD files after
2651 they have been edited.
2652
2653 =end original
2654
2655 POD ファイルを修正した後プレビューするためのいくつかの例となる一行野郎が
2656 追加されました。
2657
2658 =back
2659
2660 =head3 L<perlre>
2661
2662 =over
2663
2664 =item *
2665
2666 =begin original
2667
2668 The C<(*COMMIT)> directive is now listed in the right section
2669 (L<Verbs without an argument|perlre/Verbs without an argument>).
2670
2671 =end original
2672
2673 C<(*COMMIT)> 指示子は正しい節
2674 (L<Verbs without an argument|perlre/Verbs without an argument>) に
2675 挙げられるようになりました。
2676
2677 =back
2678
2679 =head3 L<perlrun>
2680
2681 =over
2682
2683 =item *
2684
2685 =begin original
2686
2687 L<perlrun> has undergone a significant clean-up. Most notably, the
2688 B<-0x...> form of the B<-0> flag has been clarified, and the final section
2689 on environment variables has been corrected and expanded (5.14.1).
2690
2691 =end original
2692
2693 L<perlrun> は大幅に整理されました。
2694 最も注目するべき所は、B<-0> フラグの B<-0x...> 形式が明確化され、
2695 環境変数の最後の節が修正、拡張されました(5.14.1)。
2696
2697 =back
2698
2699 =head3 L<perlsub>
2700
2701 =over
2702
2703 =item *
2704
2705 =begin original
2706
2707 The ($;) prototype syntax, which has existed for rather a long time, is now
2708 documented in L<perlsub>. It allows a unary function to have the same
2709 precedence as a list operator.
2710
2711 =end original
2712
2713 かなり長い間存在していた ($;) プロトタイプが L<perlsub> で文書化されました。
2714 リスト演算子と同じ優先順位を持つ単項関数が可能になります。
2715
2716 =back
2717
2718 =head3 L<perltie>
2719
2720 =over
2721
2722 =item *
2723
2724 =begin original
2725
2726 The required syntax for tying handles has been documented.
2727
2728 =end original
2729
2730 ハンドルを tie するために必要な文法が文書化されました。
2731
2732 =back
2733
2734 =head3 L<perlvar>
2735
2736 =over
2737
2738 =item *
2739
2740 =begin original
2741
2742 The documentation for L<$!|perlvar/$!> has been corrected and clarified.
2743 It used to state that $! could be C<undef>, which is not the case. It was
2744 also unclear as to whether system calls set C's C<errno> or Perl's C<$!>
2745 [perl #91614].
2746
2747 =end original
2748
2749 L<$!|perlvar/$!> の文書が修正され明確化されました。
2750 以前は $! は C<undef> になることがあると書かれていましたが、そうなることは
2751 ありませんでした。
2752 また、システムコールが C の C<errno> を設定するのか Perl の C<$!> を
2753 設定するのかが不明確でした [perl #91614]。
2754
2755 =item *
2756
2757 =begin original
2758
2759 Documentation for L<$$|perlvar/$$> has been amended with additional
2760 cautions regarding changing the process ID.
2761
2762 =end original
2763
2764 L<$$|perlvar/$$> の文書は、プロセス ID の変更に関する追加の注意を
2765 追記されました。
2766
2767 =back
2768
2769 =head3 Other Changes
2770
2771 (その他の変更)
2772
2773 =over 4
2774
2775 =item *
2776
2777 =begin original
2778
2779 L<perlxs> was extended with documentation on inline typemaps.
2780
2781 =end original
2782
2783 L<perlxs> はインライン typemap の文書で拡張されました。
2784
2785 =item *
2786
2787 =begin original
2788
2789 L<perlref> has a new L<Circular References|perlref/Circular References>
2790 section explaining how circularities may not be freed and how to solve that
2791 with weak references.
2792
2793 =end original
2794
2795 L<perlref> に、なぜ循環性があると解放されないかと弱い参照を使って
2796 解決する方法を説明した新しい章である
2797 L<Circular References|perlref/Circular References> が追加されました。
2798
2799 =item *
2800
2801 =begin original
2802
2803 Parts of L<perlapi> were clarified, and Perl equivalents of some C
2804 functions have been added as an additional mode of exposition.
2805
2806 =end original
2807
2808 L<perlapi> の一部が明確化され、and Perl equivalents of some C
2809 functions have been added as an additional mode of exposition.
2810 (TBT)
2811
2812 =item *
2813
2814 =begin original
2815
2816 A few parts of L<perlre> and L<perlrecharclass> were clarified.
2817
2818 =end original
2819
2820 L<perlre> と L<perlrecharclass> のいくつかの部分が明確化されました。
2821
2822 =back
2823
2824 =head2 Removed Documentation
2825
2826 (削除された文書)
2827
2828 =head3 Old OO Documentation
2829
2830 (古い OO 文書)
2831
2832 =begin original
2833
2834 All the old OO tutorials, perltoot, perltooc, and perlboot, have been
2835 removed. The perlbot (bag of object tricks) document has been removed
2836 as well.
2837
2838 =end original
2839
2840 古い OO チュートリアルである perltoot, perltooc, perlboot は削除されました。
2841 perlbot (bag of object tricks) 文書も削除されました。
2842
2843 =head3 Development Deltas
2844
2845 =begin original
2846
2847 The perldelta files for development releases are no longer packaged with
2848 perl. These can still be found in the perl source code repository.
2849
2850 =end original
2851
2852 開発リリースの perldelta ファイルは perl と共に
2853 パッケージングされなくなりました。
2854 perl ソースコードレポジトリには残っています。
2855
2856 =head1 Diagnostics
2857
2858 (診断メッセージ)
2859
2860 =begin original
2861
2862 The following additions or changes have been made to diagnostic output,
2863 including warnings and fatal error messages. For the complete list of
2864 diagnostic messages, see L<perldiag>.
2865
2866 =end original
2867
2868 以下の追加や変更が、警告や致命的エラーメッセージ含む診断出力に行われました。
2869 完全な診断メッセージの一覧については、L<perldiag> を参照してください。
2870
2871 =head2 New Diagnostics
2872
2873 (新しい診断メッセージ)
2874
2875 =head3 New Errors
2876
2877 (新しいエラー)
2878
2879 =over 4
2880
2881 =item *
2882
2883 L<Cannot set tied @DB::args|perldiag/"Cannot set tied @DB::args">
2884
2885 =begin original
2886
2887 This error occurs when C<caller> tries to set C<@DB::args> but finds it
2888 tied. Before this error was added, it used to crash instead.
2889
2890 =end original
2891
2892 このエラーは、C<caller> が C<@DB::args> を設定しようとしたけれども
2893 これが tie されていたときに起こります。
2894 このエラーが追加される前は、クラッシュしていました。
2895
2896 =item *
2897
2898 L<Cannot tie unreifiable array|perldiag/"Cannot tie unreifiable array">
2899
2900 =begin original
2901
2902 This error is part of a safety check that the C<tie> operator does before
2903 tying a special array like C<@_>. You should never see this message.
2904
2905 =end original
2906
2907 このエラーは、C<@_> のような特殊配列を tie する前に C<tie> 演算子が行う
2908 安全チェックの一部です。
2909 このメッセージを見ることは決してないはずです。
2910
2911 =item *
2912
2913 L<&CORE::%s cannot be called directly|perldiag/"&CORE::%s cannot be called directly">
2914
2915 =begin original
2916
2917 This occurs when a subroutine in the C<CORE::> namespace is called
2918 with C<&foo> syntax or through a reference. Some subroutines
2919 in this package cannot yet be called that way, but must be
2920 called as barewords. See L</Subroutines in the C<CORE> namespace>, above.
2921
2922 =end original
2923
2924 これは、C<CORE::> 名前空間のサブルーチンが C<&foo> 文法またはリファレンスを
2925 通して呼び出されたときに起こります。
2926 このパッケージの一部のサブルーチンはまだこのような方法では呼び出せず、
2927 裸の単語で呼び出さなければなりません。
2928 上述の L</Subroutines in the C<CORE> namespace> を参照してください。
2929
2930 =item *
2931
2932 L<Source filters apply only to byte streams|perldiag/"Source filters apply only to byte streams">
2933
2934 =begin original
2935
2936 This new error occurs when you try to activate a source filter (usually by
2937 loading a source filter module) within a string passed to C<eval> under the
2938 C<unicode_eval> feature.
2939
2940 =end original
2941
2942 この新しいエラーは、C<unicode_eval> 機能が有効の時に C<eval> に渡された
2943 文字列の中でソースフィルタを(通常はソースフィルタモジュールを読み込むことで)
2944 起動しようとした場合に起こります。
2945
2946 =back
2947
2948 =head3 New Warnings
2949
2950 (新しい警告)
2951
2952 =over 4
2953
2954 =item *
2955
2956 L<defined(@array) is deprecated|perldiag/"defined(@array) is deprecated">
2957
2958 =begin original
2959
2960 The long-deprecated C<defined(@array)> now also warns for package variables.
2961 Previously it only issued a warning for lexical variables.
2962
2963 =end original
2964
2965 長い間非推奨となっている C<defined(@array)> は、パッケージ変数に対しても
2966 警告するようになりました。
2967 以前はレキシカル変数に対してのみ警告を出していました。
2968
2969 =item *
2970
2971 L<length() used on %s|perldiag/length() used on %s>
2972
2973 =begin original
2974
2975 This new warning occurs when C<length> is used on an array or hash, instead
2976 of C<scalar(@array)> or C<scalar(keys %hash)>.
2977
2978 =end original
2979
2980 この新しい警告は、C<scalar(@array)> や C<scalar(keys %hash)> ではなく、
2981 C<length> が配列やハッシュに使われるときに発生します。
2982
2983 =item *
2984
2985 L<lvalue attribute %s already-defined subroutine|perldiag/"lvalue attribute %s already-defined subroutine">
2986
2987 =begin original
2988
2989 L<attributes.pm|attributes> now emits this warning when the :lvalue
2990 attribute is applied to a Perl subroutine that has already been defined, as
2991 doing so can have unexpected side-effects.
2992
2993 =end original
2994
2995 L<attributes.pm|attributes> は、:lvalue 属性が既に定義されている
2996 Perl サブルーチンに適用されると出力されます; なぜならそうすると想定外の
2997 副作用があるかもしれないからです。
2998
2999 =item *
3000
3001 L<overload arg '%s' is invalid|perldiag/"overload arg '%s' is invalid">
3002
3003 =begin original
3004
3005 This warning, in the "overload" category, is produced when the overload
3006 pragma is given an argument it doesn't recognize, presumably a mistyped
3007 operator.
3008
3009 =end original
3010
3011 "overload" カテゴリに入るこの警告は、overload プラグマが (おそらくは
3012 ミスタイプした演算子で) 認識できない引数を指定されたときに発生します。
3013
3014 =item *
3015
3016 L<$[ used in %s (did you mean $] ?)|perldiag/"$[ used in %s (did you mean $] ?)">
3017
3018 =begin original
3019
3020 This new warning exists to catch the mistaken use of C<$[> in version
3021 checks. C<$]>, not C<$[>, contains the version number.
3022
3023 =end original
3024
3025 この新しい警告はバージョンチェックでの C<$[> の間違った使用法を
3026 捕捉するために存在します。
3027 バージョン番号は C<$[> ではなく C<$]> に含まれています。
3028
3029 =item *
3030
3031 L<Useless assignment to a temporary|perldiag/"Useless assignment to a temporary">
3032
3033 =begin original
3034
3035 Assigning to a temporary scalar returned
3036 from an lvalue subroutine now produces this
3037 warning [perl #31946].
3038
3039 =end original
3040
3041 左辺値サブルーチンから返された一時スカラに代入するとこの警告が
3042 出力されるようになりました [perl #31946]。
3043
3044 =item *
3045
3046 L<Useless use of \E|perldiag/"Useless use of \E">
3047
3048 =begin original
3049
3050 C<\E> does nothing unless preceded by C<\Q>, C<\L> or C<\U>.
3051
3052 =end original
3053
3054 C<\Q>, C<\L>, C<\U> のいずれかが前にない場合、C<\E> は何もしません。
3055
3056 =back
3057
3058 =head2 Removed Errors
3059
3060 (削除されたエラー)
3061
3062 =over
3063
3064 =item *
3065
3066 "sort is now a reserved word"
3067
3068 =begin original
3069
3070 This error used to occur when C<sort> was called without arguments,
3071 followed by C<;> or C<)>. (E.g., C<sort;> would die, but C<{sort}> was
3072 OK.) This error message was added in Perl 3 to catch code like
3073 C<close(sort)> which would no longer work. More than two decades later,
3074 this message is no longer appropriate. Now C<sort> without arguments is
3075 always allowed, and returns an empty list, as it did in those cases
3076 where it was already allowed [perl #90030].
3077
3078 =end original
3079
3080 このエラーは C<sort> が引数なしで呼び出され、その後に C<;> か C<)> が
3081 続いていた場合に発生していました。
3082 (例えば C<sort;> は die しますが、C<{sort}> は OK です。)
3083 このエラーは、もはや動作しない C<close(sort)> のようなコードを捕捉するために
3084 Perl 3 で追加されました。
3085 20 年以上経って、このメッセージはもはや適切ではなくなりました。
3086 引数なしの C<sort> は常に許されるようになり、今まで許されていた場合と
3087 同じように、空リストを返します [perl #90030]。
3088
3089 =back
3090
3091 =head2 Changes to Existing Diagnostics
3092
3093 (既存の診断メッセージの変更)
3094
3095 =over 4
3096
3097 =item *
3098
3099 =begin original
3100
3101 The "Applying pattern match..." or similar warning produced when an
3102 array or hash is on the left-hand side of the C<=~> operator now
3103 mentions the name of the variable.
3104
3105 =end original
3106
3107 配列やハッシュが C<=~> 演算子の左側にあるときに出力される
3108 "Applying pattern match..." または同様の警告は、変数名を
3109 出力するようになりました。
3110
3111 =item *
3112
3113 =begin original
3114
3115 The "Attempt to free non-existent shared string" has had the spelling
3116 of "non-existent" corrected to "nonexistent". It was already listed
3117 with the correct spelling in L<perldiag>.
3118
3119 =end original
3120
3121 "Attempt to free non-existent shared string" は "non-existent" という綴りを
3122 "nonexistent" に変更しました。
3123 これは L<perldiag> では既に正しい綴りになっていました。
3124
3125 =item *
3126
3127 =begin original
3128
3129 The error messages for using C<default> and C<when> outside of a
3130 topicalizer have been standardised to match the messages for C<continue>
3131 and loop controls. They now read 'Can't "default" outside a
3132 topicalizer' and 'Can't "when" outside a topicalizer'. They both used
3133 to be 'Can't use when() outside a topicalizer' [perl #91514].
3134
3135 =end original
3136
3137 解析器の外側で C<default> や C<when> を使ったときのエラーメッセージは
3138 C<continue> やループ制御のときのメッセージと一致するように
3139 標準化されました。
3140 'Can't "default" outside a topicalizer' と
3141 'Can't "when" outside a topicalizer' になりました。
3142 以前は 'Can't use when() outside a topicalizer' でした [perl #91514]。
3143
3144 =item *
3145
3146 =begin original
3147
3148 The message, "Code point 0x%X is not Unicode, no properties match it;
3149 all inverse properties do" has been changed to "Code point 0x%X is not
3150 Unicode, all \p{} matches fail; all \P{} matches succeed".
3151
3152 =end original
3153
3154 "Code point 0x%X is not Unicode, no properties match it;
3155 all inverse properties do" というメッセージは "Code point 0x%X is not
3156 Unicode, all \p{} matches fail; all \P{} matches succeed" に
3157 変更されました。
3158
3159 =item *
3160
3161 =begin original
3162
3163 Redefinition warnings for constant subroutines used to be mandatory,
3164 even occurring under C<no warnings>. Now they respect the L<warnings>
3165 pragma.
3166
3167 =end original
3168
3169 定数サブルーチンの再定義警告は、たとえ C<no warnings> のもとでも
3170 強制的に発生していました。
3171 これは L<warnings> プラグマに従うようになりました。
3172
3173 =item *
3174
3175 =begin original
3176
3177 The "glob failed" warning message is now suppressible via C<no warnings>
3178 [perl #111656].
3179
3180 =end original
3181
3182 "glob failed" 警告メッセージは C<no warnings> で抑制できるようになりました
3183 [perl #111656]。
3184
3185 =item *
3186
3187 =begin original
3188
3189 The L<Invalid version format|perldiag/"Invalid version format (%s)">
3190 error message now says "negative version number" within the parentheses,
3191 rather than "non-numeric data", for negative numbers.
3192
3193 =end original
3194
3195 L<Invalid version format|perldiag/"Invalid version format (%s)"> エラー
3196 メッセージは、負数の場合はかっこの中は "non-numeric data" ではなく
3197 "negative version number" と出力されるようになりました。
3198
3199 =item *
3200
3201 =begin original
3202
3203 The two warnings
3204 L<Possible attempt to put comments in qw() list|perldiag/"Possible attempt to put comments in qw() list">
3205 and
3206 L<Possible attempt to separate words with commas|perldiag/"Possible attempt to separate words with commas">
3207 are no longer mutually exclusive: the same C<qw> construct may produce
3208 both.
3209
3210 =end original
3211
3212 L<Possible attempt to put comments in qw() list|perldiag/"Possible attempt to put comments in qw() list">
3213
3214 L<Possible attempt to separate words with commas|perldiag/"Possible attempt to separate words with commas">
3215 の二つの警告は相互に排他的ではなくなりました: 同じ C<qw> 構文が両方を
3216 出力することがあります。
3217
3218 =item *
3219
3220 =begin original
3221
3222 The uninitialized warning for C<y///r> when C<$_> is implicit and
3223 undefined now mentions the variable name, just like the non-/r variation
3224 of the operator.
3225
3226 =end original
3227
3228 C<$_> が暗黙で未定義のときの C<y///r> の未初期化警告は、非 /r 系の
3229 演算子と同様に、変数名を出力するようになりました。
3230
3231 =item *
3232
3233 =begin original
3234
3235 The 'Use of "foo" without parentheses is ambiguous' warning has been
3236 extended to apply also to user-defined subroutines with a (;$)
3237 prototype, and not just to built-in functions.
3238
3239 =end original
3240
3241 'Use of "foo" without parentheses is ambiguous' 警告は、組み込み
3242 関数だけではなく、(;$) プロトタイプを持つユーザー定義サブルーチンにも
3243 適用されるように拡張されました。
3244
3245 =item *
3246
3247 =begin original
3248
3249 Warnings that mention the names of lexical (C<my>) variables with
3250 Unicode characters in them now respect the presence or absence of the
3251 C<:utf8> layer on the output handle, instead of outputting UTF8
3252 regardless. Also, the correct names are included in the strings passed
3253 to C<$SIG{__WARN__}> handlers, rather than the raw UTF8 bytes.
3254
3255 =end original
3256
3257 Unicode 文字のレキシカル (C<my>) 変数を出力する警告は、無条件で
3258 UTF8 を出力するのではなく、出力ハンドルの C<:utf8> 層のありなしに
3259 対応するようになりました。
3260 また、正しい名前は生 UTF8 バイトではなく、C<$SIG{__WARN__}> ハンドラに
3261 渡される文字列に含まれるようになりました。
3262
3263 =back
3264
3265 =head1 Utility Changes
3266
3267 (ツールの変更)
3268
3269 =head3 L<h2ph>
3270
3271 =over 4
3272
3273 =item *
3274
3275 =begin original
3276
3277 L<h2ph> used to generate code of the form
3278
3279 =end original
3280
3281 L<h2ph> は以下のような形のコードを生成していました
3282
3283 unless(defined(&FOO)) {
3284 sub FOO () {42;}
3285 }
3286
3287 =begin original
3288
3289 But the subroutine is a compile-time declaration, and is hence unaffected
3290 by the condition. It has now been corrected to emit a string C<eval>
3291 around the subroutine [perl #99368].
3292
3293 =end original
3294
3295 しかしサブルーチンはコンパイル時定義なので、条件の影響を受けません。
3296 サブルーチンを C<eval> で囲んだ文字列を出力するように修正されました
3297 [perl #99368]。
3298
3299 =back
3300
3301 =head3 L<splain>
3302
3303 =over 4
3304
3305 =item *
3306
3307 =begin original
3308
3309 F<splain> no longer emits backtraces with the first line number repeated.
3310
3311 =end original
3312
3313 F<splain> は最初の行番号を繰り返してバックトレースを出力しないように
3314 なりました。
3315
3316 =begin original
3317
3318 This:
3319
3320 =end original
3321
3322 以下の出力は:
3323
3324 Uncaught exception from user code:
3325 Cannot fwiddle the fwuddle at -e line 1.
3326 at -e line 1
3327 main::baz() called at -e line 1
3328 main::bar() called at -e line 1
3329 main::foo() called at -e line 1
3330
3331 =begin original
3332
3333 has become this:
3334
3335 =end original
3336
3337 以下のようになりました:
3338
3339 Uncaught exception from user code:
3340 Cannot fwiddle the fwuddle at -e line 1.
3341 main::baz() called at -e line 1
3342 main::bar() called at -e line 1
3343 main::foo() called at -e line 1
3344
3345 =item *
3346
3347 =begin original
3348
3349 Some error messages consist of multiple lines that are listed as separate
3350 entries in L<perldiag>. splain has been taught to find the separate
3351 entries in these cases, instead of simply failing to find the message.
3352
3353 =end original
3354
3355 一部のエラーメッセージは L<perldiag> に分割されたエントリとして
3356 リストされている複数の行で構成されています。
3357 splain はこのような場合に単にメッセージを見つけることに失敗するのではなく、
3358 分割されたエントリを見つけるように教えるようになりました。
3359
3360 =back
3361
3362 =head3 L<zipdetails>
3363
3364 =over 4
3365
3366 =item *
3367
3368 =begin original
3369
3370 This is a new utility, included as part of an
3371 L<IO::Compress::Base> upgrade.
3372
3373 =end original
3374
3375 これは新しいツールで、L<IO::Compress::Base> のアップグレードの一部として
3376 含まれました。
3377
3378 =begin original
3379
3380 L<zipdetails> displays information about the internal record structure
3381 of the zip file. It is not concerned with displaying any details of
3382 the compressed data stored in the zip file.
3383
3384 =end original
3385
3386 L<zipdetails> は zip ファイルの内部レコード構造についての情報を表示します。
3387 zip ファイルに保管している圧縮データの詳細を表示することには
3388 関心がありません。
3389
3390 =back
3391
3392 =head1 Configuration and Compilation
3393
3394 =over 4
3395
3396 =item *
3397
3398 F<regexp.h> has been modified for compatibility with GCC's B<-Werror>
3399 option, as used by some projects that include perl's header files (5.14.1).
3400
3401 =item *
3402
3403 C<USE_LOCALE{,_COLLATE,_CTYPE,_NUMERIC}> have been added the output of perl -V
3404 as they have affect the behaviour of the interpreter binary (albeit only
3405 in a small area).
3406
3407 =item *
3408
3409 The code and tests for L<IPC::Open2> have been moved from F<ext/IPC-Open2>
3410 into F<ext/IPC-Open3>, as C<IPC::Open2::open2()> is implemented as a thin
3411 wrapper around C<IPC::Open3::_open3()>, and hence is very tightly coupled to
3412 it.
3413
3414 =item *
3415
3416 The magic types and magic vtables are now generated from data in a new script
3417 F<regen/mg_vtable.pl>, instead of being maintained by hand. As different
3418 EBCDIC variants can't agree on the code point for '~', the character to code
3419 point conversion is done at build time by F<generate_uudmap> to a new generated
3420 header F<mg_data.h>. C<PL_vtbl_bm> and C<PL_vtbl_fm> are now defined by the
3421 pre-processor as C<PL_vtbl_regexp>, instead of being distinct C variables.
3422 C<PL_vtbl_sig> has been removed.
3423
3424 =item *
3425
3426 Building with C<-DPERL_GLOBAL_STRUCT> works again. This configuration is not
3427 generally used.
3428
3429 =item *
3430
3431 Perl configured with I<MAD> now correctly frees C<MADPROP> structures when
3432 OPs are freed. C<MADPROP>s are now allocated with C<PerlMemShared_malloc()>
3433
3434 =item *
3435
3436 F<makedef.pl> has been refactored. This should have no noticeable affect on
3437 any of the platforms that use it as part of their build (AIX, VMS, Win32).
3438
3439 =item *
3440
3441 C<useperlio> can no longer be disabled.
3442
3443 =item *
3444
3445 The file F<global.sym> is no longer needed, and has been removed. It
3446 contained a list of all exported functions, one of the files generated by
3447 F<regen/embed.pl> from data in F<embed.fnc> and F<regen/opcodes>. The code
3448 has been refactored so that the only user of F<global.sym>, F<makedef.pl>,
3449 now reads F<embed.fnc> and F<regen/opcodes> directly, removing the need to
3450 store the list of exported functions in an intermediate file.
3451
3452 As F<global.sym> was never installed, this change should not be visible
3453 outside the build process.
3454
3455 =item *
3456
3457 F<pod/buildtoc>, used by the build process to build L<perltoc>, has been
3458 refactored and simplified. It now only contains code to build L<perltoc>;
3459 the code to regenerate Makefiles has been moved to F<Porting/pod_rules.pl>.
3460 It's a bug if this change has any material effect on the build process.
3461
3462 =item *
3463
3464 F<pod/roffitall> is now built by F<pod/buildtoc>, instead of being
3465 shipped with the distribution. Its list of manpages is now generated
3466 (and therefore current). See also RT #103202 for an unresolved related
3467 issue.
3468
3469 =item *
3470
3471 The man page for C<XS::Typemap> is no longer installed. C<XS::Typemap>
3472 is a test module which is not installed, hence installing its
3473 documentation makes no sense.
3474
3475 =item *
3476
3477 The -Dusesitecustomize and -Duserelocatableinc options now work
3478 together properly.
3479
3480 =back
3481
3482 =head1 Platform Support
3483
3484 =head2 Platform-Specific Notes
3485
3486 =head3 Cygwin
3487
3488 =over 4
3489
3490 =item *
3491
3492 Since version 1.7, Cygwin supports native UTF-8 paths. If Perl is built
3493 under that environment, directory and filenames will be UTF-8 encoded.
3494
3495 Cygwin does not initialize all original Win32 environment variables. See
3496 F<README.cygwin> for a discussion of the newly-added
3497 C<Cygwin::sync_winenv()> function [perl #110190] and for
3498 further links.
3499
3500 =back
3501
3502 =head3 HP-UX
3503
3504 =over 4
3505
3506 =item *
3507
3508 HP-UX PA-RISC/64 now supports gcc-4.x
3509
3510 A fix to correct the socketsize now makes the test suite pass on HP-UX
3511 PA-RISC for 64bitall builds.
3512
3513 =back
3514
3515 =head3 VMS
3516
3517 =over 4
3518
3519 =item *
3520
3521 Remove unnecessary includes, fix miscellaneous compiler warnings and
3522 close some unclosed comments on F<vms/vms.c>.
3523
3524 Remove sockadapt layer from the VMS build.
3525
3526 =item *
3527
3528 Explicit support for VMS versions prior to v7.0 and DEC C versions
3529 prior to v6.0 has been removed.
3530
3531 =item *
3532
3533 Since Perl 5.10.1, the home-grown C<stat> wrapper has been unable to
3534 distinguish between a directory name containing an underscore and an
3535 otherwise-identical filename containing a dot in the same position
3536 (e.g., t/test_pl as a directory and t/test.pl as a file). This problem
3537 has been corrected.
3538
3539 =item *
3540
3541 The build on VMS now allows names of the resulting symbols in C code for
3542 Perl longer than 31 characters. Symbols like
3543 C<Perl__it_was_the_best_of_times_it_was_the_worst_of_times> can now be
3544 created freely without causing the VMS linker to seize up.
3545
3546 =back
3547
3548 =head3 GNU/Hurd
3549
3550 Numerous build and test failures on GNU/Hurd have been resolved with hints
3551 for building DBM modules, detection of the library search path, and enabling
3552 of large file support.
3553
3554 =head3 OpenVOS
3555
3556 Perl is now built with dynamic linking on OpenVOS, the minimum supported
3557 version of which is now Release 17.1.0.
3558
3559 =head3 SunOS
3560
3561 The CC workshop C++ compiler is now detected and used on systems that ship
3562 without cc.
3563
3564 =head1 Internal Changes
3565
3566 =over 4
3567
3568 =item *
3569
3570 The compiled representation of formats is now stored via the C<mg_ptr> of
3571 their C<PERL_MAGIC_fm>. Previously it was stored in the string buffer,
3572 beyond C<SvLEN()>, the regular end of the string. C<SvCOMPILED()> and
3573 C<SvCOMPILED_{on,off}()> now exist solely for compatibility for XS code.
3574 The first is always 0, the other two now no-ops. (5.14.1)
3575
3576 =item *
3577
3578 Some global variables have been marked C<const>, members in the interpreter
3579 structure have been re-ordered, and the opcodes have been re-ordered. The
3580 op C<OP_AELEMFAST> has been split into C<OP_AELEMFAST> and C<OP_AELEMFAST_LEX>.
3581
3582 =item *
3583
3584 When empting a hash of its elements (e.g. via undef(%h), or %h=()), HvARRAY
3585 field is no longer temporarily zeroed. Any destructors called on the freed
3586 elements see the remaining elements. Thus, %h=() becomes more like
3587 C<delete $h{$_} for keys %h>.
3588
3589 =item *
3590
3591 Boyer-Moore compiled scalars are now PVMGs, and the Boyer-Moore tables are now
3592 stored via the mg_ptr of their C<PERL_MAGIC_bm>.
3593 Previously they were PVGVs, with the tables stored in
3594 the string buffer, beyond C<SvLEN()>. This eliminates
3595 the last place where the core stores data beyond C<SvLEN()>.
3596
3597 =item *
3598
3599 Simplified logic in C<Perl_sv_magic()> introduces a small change of
3600 behaviour for error cases involving unknown magic types. Previously, if
3601 C<Perl_sv_magic()> was passed a magic type unknown to it, it would
3602
3603 =over
3604
3605 =item 1.
3606
3607 Croak "Modification of a read-only value attempted" if read only
3608
3609 =item 2.
3610
3611 Return without error if the SV happened to already have this magic
3612
3613 =item 3.
3614
3615 otherwise croak "Don't know how to handle magic of type \\%o"
3616
3617 =back
3618
3619 Now it will always croak "Don't know how to handle magic of type \\%o", even
3620 on read only values, or SVs which already have the unknown magic type.
3621
3622 =item *
3623
3624 The experimental C<fetch_cop_label> function has been renamed to
3625 C<cop_fetch_label>.
3626
3627 =item *
3628
3629 The C<cop_store_label> function has been added to the API, but is
3630 experimental.
3631
3632 =item *
3633
3634 F<embedvar.h> has been simplified, and one level of macro indirection for
3635 PL_* variables has been removed for the default (non-multiplicity)
3636 configuration. PERLVAR*() macros now directly expand their arguments to
3637 tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>, with
3638 F<embedvar.h> defining a macro to map C<PL_Idefgv> to C<PL_defgv>. XS code
3639 which has unwarranted chumminess with the implementation may need updating.
3640
3641 =item *
3642
3643 An API has been added to explicitly choose whether or not to export XSUB
3644 symbols. More detail can be found in the comments for commit e64345f8.
3645
3646 =item *
3647
3648 The C<is_gv_magical_sv> function has been eliminated and merged with
3649 C<gv_fetchpvn_flags>. It used to be called to determine whether a GV
3650 should be autovivified in rvalue context. Now it has been replaced with a
3651 new C<GV_ADDMG> flag (not part of the API).
3652
3653 =item *
3654
3655 The returned code point from the function C<utf8n_to_uvuni()>
3656 when the input is malformed UTF-8, malformations are allowed, and
3657 C<utf8> warnings are off is now the Unicode REPLACEMENT CHARACTER
3658 whenever the malformation is such that no well-defined code point can be
3659 computed. Previously the returned value was essentially garbage. The
3660 only malformations that have well-defined values are a zero-length
3661 string (0 is the return), and overlong UTF-8 sequences.
3662
3663 =item *
3664
3665 Padlists are now marked C<AvREAL>; i.e., reference-counted. They have
3666 always been reference-counted, but were not marked real, because F<pad.c>
3667 did its own clean-up, instead of using the usual clean-up code in F<sv.c>.
3668 That caused problems in thread cloning, so now the C<AvREAL> flag is on,
3669 but is turned off in F<pad.c> right before the padlist is freed (after
3670 F<pad.c> has done its custom freeing of the pads).
3671
3672 =item *
3673
3674 All the C files that make up the Perl core have been converted to UTF-8.
3675
3676 =item *
3677
3678 These new functions have been added as part of the work on Unicode symbols:
3679
3680 HvNAMELEN
3681 HvNAMEUTF8
3682 HvENAMELEN
3683 HvENAMEUTF8
3684 gv_init_pv
3685 gv_init_pvn
3686 gv_init_pvsv
3687 gv_fetchmeth_pv
3688 gv_fetchmeth_pvn
3689 gv_fetchmeth_sv
3690 gv_fetchmeth_pv_autoload
3691 gv_fetchmeth_pvn_autoload
3692 gv_fetchmeth_sv_autoload
3693 gv_fetchmethod_pv_flags
3694 gv_fetchmethod_pvn_flags
3695 gv_fetchmethod_sv_flags
3696 gv_autoload_pv
3697 gv_autoload_pvn
3698 gv_autoload_sv
3699 newGVgen_flags
3700 sv_derived_from_pv
3701 sv_derived_from_pvn
3702 sv_derived_from_sv
3703 sv_does_pv
3704 sv_does_pvn
3705 sv_does_sv
3706 whichsig_pv
3707 whichsig_pvn
3708 whichsig_sv
3709 newCONSTSUB_flags
3710
3711 The gv_fetchmethod_*_flags functions, like gv_fetchmethod_flags, are
3712 experimental and may change in a future release.
3713
3714 =item *
3715
3716 The following functions were added. These are I<not> part of the API:
3717
3718 GvNAMEUTF8
3719 GvENAMELEN
3720 GvENAME_HEK
3721 CopSTASH_flags
3722 CopSTASH_flags_set
3723 PmopSTASH_flags
3724 PmopSTASH_flags_set
3725 sv_sethek
3726 HEKfARG
3727
3728 There is also a C<HEKf> macro corresponding to C<SVf>, for
3729 interpolating HEKs in formatted strings.
3730
3731 =item *
3732
3733 C<sv_catpvn_flags> takes a couple of new internal-only flags,
3734 C<SV_CATBYTES> and C<SV_CATUTF8>, which tell it whether the char array to
3735 be concatenated is UTF8. This allows for more efficient concatenation than
3736 creating temporary SVs to pass to C<sv_catsv>.
3737
3738 =item *
3739
3740 For XS AUTOLOAD subs, $AUTOLOAD is set once more, as it was in 5.6.0. This
3741 is in addition to setting C<SvPVX(cv)>, for compatibility with 5.8 to 5.14.
3742 See L<perlguts/Autoloading with XSUBs>.
3743
3744 =item *
3745
3746 Perl now checks whether the array (the linearised isa) returned by a MRO
3747 plugin begins with the name of the class itself, for which the array was
3748 created, instead of assuming that it does. This prevents the first element
3749 from being skipped during method lookup. It also means that
3750 C<mro::get_linear_isa> may return an array with one more element than the
3751 MRO plugin provided [perl #94306].
3752
3753 =item *
3754
3755 C<PL_curstash> is now reference-counted.
3756
3757 =item *
3758
3759 There are now feature bundle hints in C<PL_hints> (C<$^H>) that version
3760 declarations use, to avoid having to load F<feature.pm>. One setting of
3761 the hint bits indicates a "custom" feature bundle, which means that the
3762 entries in C<%^H> still apply. F<feature.pm> uses that.
3763
3764 The C<HINT_FEATURE_MASK> macro is defined in F<perl.h> along with other
3765 hints. Other macros for setting and testing features and bundles are in
3766 the new F<feature.h>. C<FEATURE_IS_ENABLED> (which has moved to
3767 F<feature.h>) is no longer used throughout the codebase, but more specific
3768 macros, e.g., C<FEATURE_SAY_IS_ENABLED>, that are defined in F<feature.h>.
3769
3770 =item *
3771
3772 F<lib/feature.pm> is now a generated file, created by the new
3773 F<regen/feature.pl> script, which also generates F<feature.h>.
3774
3775 =item *
3776
3777 Tied arrays are now always C<AvREAL>. If C<@_> or C<DB::args> is tied, it
3778 is reified first, to make sure this is always the case.
3779
3780 =item *
3781
3782 Two new functions C<utf8_to_uvchr_buf()> and C<utf8_to_uvuni_buf()> have
3783 been added. These are the same as C<utf8_to_uvchr> and
3784 C<utf8_to_uvuni> (which are now deprecated), but take an extra parameter
3785 that is used to guard against reading beyond the end of the input
3786 string.
3787 See L<perlapi/utf8_to_uvchr_buf> and L<perlapi/utf8_to_uvuni_buf>.
3788
3789 =item *
3790
3791 The regular expression engine now does TRIE case insensitive matches
3792 under Unicode. This may change the output of C<< use re 'debug'; >>,
3793 and will speed up various things.
3794
3795 =item *
3796
3797 There is a new C<wrap_op_checker()> function, which provides a thread-safe
3798 alternative to writing to C<PL_check> directly.
3799
3800 =back
3801
3802 =head1 Selected Bug Fixes
3803
3804 =head2 Array and hash
3805
3806 =over
3807
3808 =item *
3809
3810 A bug has been fixed that would cause a "Use of freed value in iteration"
3811 error if the next two hash elements that would be iterated over are
3812 deleted [perl #85026]. (5.14.1)
3813
3814 =item *
3815
3816 Deleting the current hash iterator (the hash element that would be returend
3817 by the next call to C<each>) in void context used not to free it
3818 [perl #85026].
3819
3820 =item *
3821
3822 Deletion of methods via C<delete $Class::{method}> syntax used to update
3823 method caches if called in void context, but not scalar or list context.
3824
3825 =item *
3826
3827 When hash elements are deleted in void context, the internal hash entry is
3828 now freed before the value is freed, to prevent destructors called by that
3829 latter freeing from seeing the hash in an inconsistent state. It was
3830 possible to cause double-frees if the destructor freed the hash itself
3831 [perl #100340].
3832
3833 =item *
3834
3835 A C<keys> optimisation in Perl 5.12.0 to make it faster on empty hashes
3836 caused C<each> not to reset the iterator if called after the last element
3837 was deleted.
3838
3839 =item *
3840
3841 Freeing deeply nested hashes no longer crashes [perl #44225].
3842
3843 =item *
3844
3845 It is possible from XS code to create hashes with elements that have no
3846 values. The hash element and slice operators used to crash
3847 when handling these in lvalue context. They now
3848 produce a "Modification of non-creatable hash value attempted" error
3849 message.
3850
3851 =item *
3852
3853 If list assignment to a hash or array triggered destructors that freed the
3854 hash or array itself, a crash would ensue. This is no longer the case
3855 [perl #107440].
3856
3857 =item *
3858
3859 It used to be possible to free the typeglob of a localised array or hash
3860 (e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
3861
3862 =item *
3863
3864 Some core bugs affecting L<Hash::Util> have been fixed: locking a hash
3865 element that is a glob copy no longer causes subsequent assignment to it to
3866 corrupt the glob, and unlocking a hash element that holds a copy-on-write
3867 scalar no longer causes modifications to that scalar to modify other
3868 scalars that were sharing the same string buffer.
3869
3870 =back
3871
3872 =head2 C API fixes
3873
3874 =over
3875
3876 =item *
3877
3878 The C<newHVhv> XS function now works on tied hashes, instead of crashing or
3879 returning an empty hash.
3880
3881 =item *
3882
3883 The C<SvIsCOW> C macro now returns false for read-only copies of typeglobs,
3884 such as those created by:
3885
3886 $hash{elem} = *foo;
3887 Hash::Util::lock_value %hash, 'elem';
3888
3889 It used to return true.
3890
3891 =item *
3892
3893 The C<SvPVutf8> C function no longer tries to modify its argument,
3894 resulting in errors [perl #108994].
3895
3896 =item *
3897
3898 C<SvPVutf8> now works properly with magical variables.
3899
3900 =item *
3901
3902 C<SvPVbyte> now works properly non-PVs.
3903
3904 =item *
3905
3906 When presented with malformed UTF-8 input, the XS-callable functions
3907 C<is_utf8_string()>, C<is_utf8_string_loc()>, and
3908 C<is_utf8_string_loclen()> could read beyond the end of the input
3909 string by up to 12 bytes. This no longer happens. [perl #32080].
3910 However, currently, C<is_utf8_char()> still has this defect, see
3911 L</is_utf8_char()> above.
3912
3913 =item *
3914
3915 The C-level C<pregcomp> function could become confused as to whether the
3916 pattern was in UTF8 if the pattern was an overloaded, tied, or otherwise
3917 magical scalar [perl #101940].
3918
3919 =back
3920
3921 =head2 Compile-time hints
3922
3923 =over
3924
3925 =item *
3926
3927 Tying C<%^H> no longer causes perl to crash or ignore the contents of
3928 C<%^H> when entering a compilation scope [perl #106282].
3929
3930 =item *
3931
3932 C<eval $string> and C<require> used not to
3933 localise C<%^H> during compilation if it
3934 was empty at the time the C<eval> call itself was compiled. This could
3935 lead to scary side effects, like C<use re "/m"> enabling other flags that
3936 the surrounding code was trying to enable for its caller [perl #68750].
3937
3938 =item *
3939
3940 C<eval $string> and C<require> no longer localise hints (C<$^H> and C<%^H>)
3941 at run time, but only during compilation of the $string or required file.
3942 This makes C<BEGIN { $^H{foo}=7 }> equivalent to
3943 C<BEGIN { eval '$^H{foo}=7' }> [perl #70151].
3944
3945 =item *
3946
3947 Creating a BEGIN block from XS code (via C<newXS> or C<newATTRSUB>) would,
3948 on completion, make the hints of the current compiling code the current
3949 hints. This could cause warnings to occur in a non-warning scope.
3950
3951 =back
3952
3953 =head2 Copy-on-write scalars
3954
3955 Copy-on-write or shared hash key scalars
3956 were introduced in 5.8.0, but most Perl code
3957 did not encounter them (they were used mostly internally). Perl
3958 5.10.0 extended them, such that assigning C<__PACKAGE__> or a
3959 hash key to a scalar would make it copy-on-write. Several parts
3960 of Perl were not updated to account for them, but have now been fixed.
3961
3962 =over
3963
3964 =item *
3965
3966 C<utf8::decode> had a nasty bug that would modify copy-on-write scalars'
3967 string buffers in place (i.e., skipping the copy). This could result in
3968 hashes having two elements with the same key [perl #91834].
3969
3970 =item *
3971
3972 Lvalue subroutines were not allowing COW scalars to be returned. This was
3973 fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context
3974 was not fixed until this release.
3975
3976 =item *
3977
3978 Elements of restricted hashes (see the L<fields> pragma) containing
3979 copy-on-write values couldn't be deleted, nor could such hashes be cleared
3980 (C<%hash = ()>).
3981
3982 =item *
3983
3984 Localising a tied variable used to make it read-only if it contained a
3985 copy-on-write string.
3986
3987 =item *
3988
3989 Assigning a copy-on-write string to a stash
3990 element no longer causes a double free. Regardless of this change, the
3991 results of such assignments are still undefined.
3992
3993 =item *
3994
3995 Assigning a copy-on-write string to a tied variable no longer stops that
3996 variable from being tied if it happens to be a PVMG or PVLV internally.
3997
3998 =item *
3999
4000 Doing a substitution on a tied variable returning a copy-on-write
4001 scalar used to cause an assertion failure or an "Attempt to free
4002 nonexistent shared string" warning.
4003
4004 =item *
4005
4006 This one is a regression from 5.12: In 5.14.0, the bitwise assignment
4007 operators C<|=>, C<^=> and C<&=> started leaving the left-hand side
4008 undefined if it happened to be a copy-on-write string [perl #108480].
4009
4010 =item *
4011
4012 L<Storable>, L<Devel::Peek> and L<PerlIO::scalar> had similar problems.
4013 See L</Updated Modules and Pragmata>, above.
4014
4015 =back
4016
4017 =head2 The debugger
4018
4019 =over
4020
4021 =item *
4022
4023 F<dumpvar.pl>, and consequently the C<x> command in the debugger, have been
4024 fixed to handle objects blessed into classes whose names contain "=". The
4025 contents of such objects used not to be dumped [perl #101814].
4026
4027 =item *
4028
4029 The "R" command for restarting a debugger session has been fixed to work on
4030 Windows, or any other system lacking a C<POSIX::_SC_OPEN_MAX> constant
4031 [perl #87740].
4032
4033 =item *
4034
4035 The C<#line 42 foo> directive used not to update the arrays of lines used
4036 by the debugger if it occurred in a string eval. This was partially fixed
4037 in 5.14, but it only worked for a single C<#line 42 foo> in each eval. Now
4038 it works for multiple.
4039
4040 =item *
4041
4042 When subroutine calls are intercepted by the debugger, the name of the
4043 subroutine or a reference to it is stored in C<$DB::sub>, for the debugger
4044 to access. In some cases (such as C<$foo = *bar; undef *bar; &$foo>)
4045 C<$DB::sub> would be set to a name that could not be used to find the
4046 subroutine, and so the debugger's attempt to call it would fail. Now the
4047 check to see whether a reference is needed is more robust, so those
4048 problems should not happen anymore [rt.cpan.org #69862].
4049
4050 =item *
4051
4052 Every subroutine has a filename associated with it that the debugger uses.
4053 The one associated with constant subroutines used to be misallocated when
4054 cloned under threads. Consequently, debugging threaded applications could
4055 result in memory corruption [perl #96126].
4056
4057 =back
4058
4059 =head2 Dereferencing operators
4060
4061 =over
4062
4063 =item *
4064
4065 C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
4066 return true for most, but not all built-in variables, if
4067 they had not been used yet. This bug affected C<${^GLOBAL_PHASE}> and
4068 C<${^UTF8CACHE}>, among others. It also used to return false if the
4069 package name was given as well (C<${"::!"}>) [perl #97978, #97492].
4070
4071 =item *
4072
4073 Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
4074 represents the name of a built-in global variable used to return false if
4075 the variable had never been used before, but only on the I<first> call.
4076 This, too, has been fixed.
4077
4078 =item *
4079
4080 Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
4081 values. It would die in strict mode or lvalue context for most undefined
4082 values, but would be treated as the empty string (with a warning) for the
4083 specific scalar return by C<undef()> (C<&PL_sv_undef> internally). This
4084 has been corrected. C<undef()> is now treated like other undefined
4085 scalars, as in Perl 5.005.
4086
4087 =back
4088
4089 =head2 Filehandle, last-accessed
4090
4091 Perl has an internal variable that stores the last filehandle to be
4092 accessed. It is used by C<$.> and by C<tell> and C<eof> without
4093 arguments.
4094
4095 =over
4096
4097 =item *
4098
4099 It used to be possible to set this internal variable to a glob copy and
4100 then modify that glob copy to be something other than a glob, and still
4101 have the last-accessed filehandle associated with the variable after
4102 assigning a glob to it again:
4103
4104 my $foo = *STDOUT; # $foo is a glob copy
4105 <$foo>; # $foo is now the last-accessed handle
4106 $foo = 3; # no longer a glob
4107 $foo = *STDERR; # still the last-accessed handle
4108
4109 Now the C<$foo = 3> assignment unsets that internal variable, so there
4110 is no last-accessed filehandle, just as if C<< <$foo> >> had never
4111 happened.
4112
4113 This also prevents some unrelated handle from becoming the last-accessed
4114 handle if $foo falls out of scope and the same internal SV gets used for
4115 another handle [perl #97988].
4116
4117 =item *
4118
4119 A regression in 5.14 caused these statements not to set that internal
4120 variable:
4121
4122 my $fh = *STDOUT;
4123 tell $fh;
4124 eof $fh;
4125 seek $fh, 0,0;
4126 tell *$fh;
4127 eof *$fh;
4128 seek *$fh, 0,0;
4129 readline *$fh;
4130
4131 This is now fixed, but C<tell *{ *$fh }> still has the problem, and it
4132 is not clear how to fix it [perl #106536].
4133
4134 =back
4135
4136 =head2 Filetests and C<stat>
4137
4138 The term "filetests" refers to the operators that consist of a hyphen
4139 followed by a single letter: C<-r>, C<-x>, C<-M>, etc. The term "stacked"
4140 when applied to filetests means followed by another filetest operator
4141 sharing the same operand, as in C<-r -x -w $fooo>.
4142
4143 =over
4144
4145 =item *
4146
4147 C<stat> produces more consistent warnings. It no longer warns for "_"
4148 [perl #71002] and no longer skips the warning at times for other unopened
4149 handles. It no longer warns about an unopened handle when the operating
4150 system's C<fstat> function fails.
4151
4152 =item *
4153
4154 C<stat> would sometimes return negative numbers for large inode numbers,
4155 because it was using the wrong internal C type. [perl #84590]
4156
4157 =item *
4158
4159 C<lstat> is documented to fall back to C<stat> (with a warning) when given
4160 a filehandle. When passed an IO reference, it was actually doing the
4161 equivalent of S<C<stat _>> and ignoring the handle.
4162
4163 =item *
4164
4165 C<-T _> with no preceding C<stat> used to produce a
4166 confusing "uninitialized" warning, even though there
4167 is no visible uninitialized value to speak of.
4168
4169 =item *
4170
4171 C<-T>, C<-B>, C<-l> and C<-t> now work
4172 when stacked with other filetest operators
4173 [perl #77388].
4174
4175 =item *
4176
4177 In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a
4178 tied argument belonging to the previous argument to a list operator, if
4179 called with a bareword argument or no argument at all. This has been
4180 fixed, so C<push @foo, $tied, -r> no longer calls FETCH on C<$tied>.
4181
4182 =item *
4183
4184 In Perl 5.6, C<-l> followed by anything other than a bareword would treat
4185 its argument as a file name. That was changed in 5.8 for glob references
4186 (C<\*foo>), but not for globs themselves (C<*foo>). C<-l> started
4187 returning C<undef> for glob references without setting the last
4188 stat buffer that the "_" handle uses, but only if warnings
4189 were turned on. With warnings off, it was the same as 5.6.
4190 In other words, it was simply buggy and inconsistent. Now the 5.6
4191 behaviour has been restored.
4192
4193 =item *
4194
4195 C<-l> followed by a bareword no longer "eats" the previous argument to
4196 the list operator in whose argument list it resides. Hence,
4197 C<print "bar", -l foo> now actually prints "bar", because C<-l>
4198 on longer eats it.
4199
4200 =item *
4201
4202 Perl keeps several internal variables to keep track of the last stat
4203 buffer, from which file(handle) it originated, what type it was, and
4204 whether the last stat succeeded.
4205
4206 There were various cases where these could get out of synch, resulting in
4207 inconsistent or erratic behaviour in edge cases (every mention of C<-T>
4208 applies to C<-B> as well):
4209
4210 =over
4211
4212 =item *
4213
4214 C<-T I<HANDLE>>, even though it does a C<stat>, was not resetting the last
4215 stat type, so an C<lstat _> following it would merrily return the wrong
4216 results. Also, it was not setting the success status.
4217
4218 =item *
4219
4220 Freeing the handle last used by C<stat> or a filetest could result in
4221 S<C<-T _>> using an unrelated handle.
4222
4223 =item *
4224
4225 C<stat> with an IO reference would not reset the stat type or record the
4226 filehandle for S<C<-T _>> to use.
4227
4228 =item *
4229
4230 Fatal warnings could cause the stat buffer not to be reset
4231 for a filetest operator on an unopened filehandle or C<-l> on any handle.
4232 Fatal warnings also stopped C<-T> from setting C<$!>.
4233
4234 =item *
4235
4236 When the last stat was on an unreadable file, C<-T _> is supposed to
4237 return C<undef>, leaving the last stat buffer unchanged. But it was
4238 setting the stat type, causing C<lstat _> to stop working.
4239
4240 =item *
4241
4242 C<-T I<FILENAME>> was not resetting the internal stat buffers for
4243 unreadable files.
4244
4245 =back
4246
4247 These have all been fixed.
4248
4249 =back
4250
4251 =head2 Formats
4252
4253 =over
4254
4255 =item *
4256
4257 A number of edge cases have been fixed with formats and C<formline>;
4258 in particular, where the format itself is potentially variable (such as
4259 with ties and overloading), and where the format and data differ in their
4260 encoding. In both these cases, it used to possible for the output to be
4261 corrupted [perl #91032].
4262
4263 =item *
4264
4265 C<formline> no longer converts its argument into a string in-place. So
4266 passing a reference to C<formline> no longer destroys the reference
4267 [perl #79532].
4268
4269 =item *
4270
4271 Assignment to C<$^A> (the format output accumulator) now recalculates
4272 the number of lines output.
4273
4274 =back
4275
4276 =head2 C<given> and C<when>
4277
4278 =over
4279
4280 =item *
4281
4282 C<given> was not scoping its implicit $_ properly, resulting in memory
4283 leaks or "Variable is not available" warnings [perl #94682].
4284
4285 =item *
4286
4287 C<given> was not calling set-magic on the implicit lexical C<$_> that it
4288 uses. This meant, for example, that C<pos> would be remembered from one
4289 execution of the same C<given> block to the next, even if the input were a
4290 different variable [perl #84526].
4291
4292 =item *
4293
4294 C<when> blocks are now capable of returning variables declared inside the
4295 enclosing C<given> block [perl #93548].
4296
4297 =back
4298
4299 =head2 The C<glob> operator
4300
4301 =over
4302
4303 =item *
4304
4305 On OSes other than VMS, Perl's C<glob> operator (and the C<< <...> >> form)
4306 use L<File::Glob> underneath. L<File::Glob> splits the pattern into words,
4307 before feeding each word to its C<bsd_glob> function.
4308
4309 There were several inconsistencies in the way the split was done. Now
4310 quotation marks (' and ") are always treated as shell-style word delimiters
4311 (that allow whitespace as part of a word) and backslashes are always
4312 preserved, unless they exist to escape quotation marks. Before, those
4313 would only sometimes be the case, depending on whether the pattern
4314 contained whitespace. Also, escaped whitespace at the end of the pattern
4315 is no longer stripped [perl #40470].
4316
4317 =item *
4318
4319 C<CORE::glob> now works as a way to call the default globbing function. It
4320 used to respect overrides, despite the C<CORE::> prefix.
4321
4322 =item *
4323
4324 Under miniperl (used to configure modules when perl itself is built),
4325 C<glob> now clears %ENV before calling csh, since the latter croaks on some
4326 systems if it does not like the contents of the LS_COLORS enviroment
4327 variable [perl #98662].
4328
4329 =back
4330
4331 =head2 Lvalue subroutines
4332
4333 =over
4334
4335 =item *
4336
4337 Explicit return now returns the actual argument passed to return, instead
4338 of copying it [perl #72724, #72706].
4339
4340 =item *
4341
4342 Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on
4343 the left-hand side of C<=>) for the last statement and the arguments to
4344 return. Since lvalue subroutines are not always called in lvalue context,
4345 this restriction has been lifted.
4346
4347 =item *
4348
4349 Lvalue subroutines are less restrictive as to what values can be returned.
4350 It used to croak on values returned by C<shift> and C<delete> and from
4351 other subroutines, but no longer does so [perl #71172].
4352
4353 =item *
4354
4355 Empty lvalue subroutines (C<sub :lvalue {}>) used to return C<@_> in list
4356 context. In fact, all subroutines used to, but regular subs were fixed in
4357 Perl 5.8.2. Now lvalue subroutines have been likewise fixed.
4358
4359 =item *
4360
4361 Autovivification now works on values returned from lvalue subroutines
4362 [perl #7946], as does returning C<keys> in lvalue context.
4363
4364 =item *
4365
4366 Lvalue subroutines used to copy their return values in rvalue context. Not
4367 only was this a waste of CPU cycles, but it also caused bugs. A C<($)>
4368 prototype would cause an lvalue sub to copy its return value [perl #51408],
4369 and C<while(lvalue_sub() =~ m/.../g) { ... }> would loop endlessly
4370 [perl #78680].
4371
4372 =item *
4373
4374 When called in potential lvalue context
4375 (e.g., subroutine arguments or a list
4376 passed to C<for>), lvalue subroutines used to copy
4377 any read-only value that was returned. E.g., C< sub :lvalue { $] } >
4378 would not return C<$]>, but a copy of it.
4379
4380 =item *
4381
4382 When called in potential lvalue context, an lvalue subroutine returning
4383 arrays or hashes used to bind the arrays or hashes to scalar variables,
4384 resulting in bugs. This was fixed in 5.14.0 if an array were the first
4385 thing returned from the subroutine (but not for C<$scalar, @array> or
4386 hashes being returned). Now a more general fix has been applied
4387 [perl #23790].
4388
4389 =item *
4390
4391 Method calls whose arguments were all surrounded with C<my()> or C<our()>
4392 (as in C<< $object->method(my($a,$b)) >>) used to force lvalue context on
4393 the subroutine. This would prevent lvalue methods from returning certain
4394 values.
4395
4396 =item *
4397
4398 Lvalue sub calls that are not determined to be such at compile time
4399 (C<&$name> or &{"name"}) are no longer exempt from strict refs if they
4400 occur in the last statement of an lvalue subroutine [perl #102486].
4401
4402 =item *
4403
4404 Sub calls whose subs are not visible at compile time, if
4405 they occurred in the last statement of an lvalue subroutine,
4406 would reject non-lvalue subroutines and die with "Can't modify non-lvalue
4407 subroutine call" [perl #102486].
4408
4409 Non-lvalue sub calls whose subs I<are> visible at compile time exhibited
4410 the opposite bug. If the call occurred in the last statement of an lvalue
4411 subroutine, there would be no error when the lvalue sub was called in
4412 lvalue context. Perl would blindly assign to the temporary value returned
4413 by the non-lvalue subroutine.
4414
4415 =item *
4416
4417 C<AUTOLOAD> routines used to take precedence over the actual sub being
4418 called (i.e., when autoloading wasn't needed), for sub calls in lvalue or
4419 potential lvalue context, if the subroutine was not visible at compile
4420 time.
4421
4422 =item *
4423
4424 Applying the C<:lvalue> attribute to an XSUB or to an aliased subroutine
4425 stub with C<< sub foo :lvalue; >> syntax stopped working in Perl 5.12.
4426 This has been fixed.
4427
4428 =item *
4429
4430 Applying the :lvalue attribute to subroutine that is already defined does
4431 not work properly, as the attribute changes the way the sub is compiled.
4432 Hence, Perl 5.12 began warning when an attempt is made to apply the
4433 attribute to an already defined sub. In such cases, the attribute is
4434 discarded.
4435
4436 But the change in 5.12 missed the case where custom attributes are also
4437 present: that case still silently and ineffectively applied the attribute.
4438 That omission has now been corrected. C<sub foo :lvalue :Whatever> (when
4439 C<foo> is already defined) now warns about the :lvalue attribute, and does
4440 not apply it.
4441
4442 =item *
4443
4444 A bug affecting lvalue context propagation through nested lvalue subroutine
4445 calls has been fixed. Previously, returning a value in nested rvalue
4446 context would be treated as lvalue context by the inner subroutine call,
4447 resulting in some values (such as read-only values) being rejected.
4448
4449 =back
4450
4451 =head2 Overloading
4452
4453 =over
4454
4455 =item *
4456
4457 Arithmetic assignment (C<$left += $right>) involving overloaded objects
4458 that rely on the 'nomethod' override no longer segfault when the left
4459 operand is not overloaded.
4460
4461 =item *
4462
4463 Errors that occur when methods cannot be found during overloading now
4464 mention the correct package name, as they did in 5.8.x, instead of
4465 erroneously mentioning the "overload" package, as they have since 5.10.0.
4466
4467 =item *
4468
4469 Undefining C<%overload::> no longer causes a crash.
4470
4471 =back
4472
4473 =head2 Prototypes of built-in keywords
4474
4475 =over
4476
4477 =item *
4478
4479 The C<prototype> function no longer dies for the C<__FILE__>, C<__LINE__>
4480 and C<__PACKAGE__> directives. It now returns an empty-string prototype
4481 for them, because they are syntactically indistinguishable from nullary
4482 functions like C<time>.
4483
4484 =item *
4485
4486 C<prototype> now returns C<undef> for all overridable infix operators,
4487 such as C<eq>, which are not callable in any way resembling functions.
4488 It used to return incorrect prototypes for some and die for others
4489 [perl #94984].
4490
4491 =item *
4492
4493 The prototypes of several built-in functions--C<getprotobynumber>, C<lock>,
4494 C<not> and C<select>--have been corrected, or at least are now closer to
4495 reality than before.
4496
4497 =back
4498
4499 =head2 Regular expressions
4500
4501 =for comment Is it possible to merge some of these items?
4502
4503 =over 4
4504
4505 =item *
4506
4507 C</[[:ascii:]]/> and C</[[:blank:]]/> now use locale rules under
4508 C<use locale> when the platform supports that. Previously, they used
4509 the platform's native character set.
4510
4511 =item *
4512
4513 C<m/[[:ascii:]]/i> and C</\p{ASCII}/i> now match identically (when not
4514 under a differing locale). This fixes a regression introduced in 5.14
4515 in which the first expression could match characters outside of ASCII,
4516 such as the KELVIN SIGN.
4517
4518 =item *
4519
4520 C</.*/g> would sometimes refuse to match at the end of a string that ends
4521 with "\n". This has been fixed [perl #109206].
4522
4523 =item *
4524
4525 Starting with 5.12.0, Perl used to get its internal bookkeeping muddled up
4526 after assigning C<${ qr// }> to a hash element and locking it with
4527 L<Hash::Util>. This could result in double frees, crashes or erratic
4528 behaviour.
4529
4530 =item *
4531
4532 The new (in 5.14.0) regular expression modifier C</a> when repeated like
4533 C</aa> forbids the characters outside the ASCII range that match
4534 characters inside that range from matching under C</i>. This did not
4535 work under some circumstances, all involving alternation, such as:
4536
4537 "\N{KELVIN SIGN}" =~ /k|foo/iaa;
4538
4539 succeeded inappropriately. This is now fixed.
4540
4541 =item *
4542
4543 5.14.0 introduced some memory leaks in regular expression character
4544 classes such as C<[\w\s]>, which have now been fixed. (5.14.1)
4545
4546 =item *
4547
4548 An edge case in regular expression matching could potentially loop.
4549 This happened only under C</i> in bracketed character classes that have
4550 characters with multi-character folds, and the target string to match
4551 against includes the first portion of the fold, followed by another
4552 character that has a multi-character fold that begins with the remaining
4553 portion of the fold, plus some more.
4554
4555 "s\N{U+DF}" =~ /[\x{DF}foo]/i
4556
4557 is one such case. C<\xDF> folds to C<"ss">. (5.14.1)
4558
4559 =item *
4560
4561 A few characters in regular expression pattern matches did not
4562 match correctly in some circumstances, all involving C</i>. The
4563 affected characters are:
4564 COMBINING GREEK YPOGEGRAMMENI,
4565 GREEK CAPITAL LETTER IOTA,
4566 GREEK CAPITAL LETTER UPSILON,
4567 GREEK PROSGEGRAMMENI,
4568 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA,
4569 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
4570 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA,
4571 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
4572 LATIN SMALL LETTER LONG S,
4573 LATIN SMALL LIGATURE LONG S T,
4574 and
4575 LATIN SMALL LIGATURE ST.
4576
4577 =item *
4578
4579 A memory leak regression in regular expression compilation
4580 under threading has been fixed.
4581
4582 =item *
4583
4584 A regression introduced in 5.13.6 has
4585 been fixed. This involved an inverted
4586 bracketed character class in a regular expression that consisted solely
4587 of a Unicode property. That property wasn't getting inverted outside the
4588 Latin1 range.
4589
4590 =item *
4591
4592 Three problematic Unicode characters now work better in regex pattern matching under C</i>
4593
4594 In the past, three Unicode characters:
4595 LATIN SMALL LETTER SHARP S,
4596 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
4597 and
4598 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
4599 along with the sequences that they fold to
4600 (including "ss" in the case of LATIN SMALL LETTER SHARP S),
4601 did not properly match under C</i>. 5.14.0 fixed some of these cases,
4602 but introduced others, including a panic when one of the characters or
4603 sequences was used in the C<(?(DEFINE)> regular expression predicate.
4604 The known bugs that were introduced in 5.14 have now been fixed; as well
4605 as some other edge cases that have never worked until now. All these
4606 involve using the characters and sequences outside bracketed character
4607 classes under C</i>. This closes [perl #98546].
4608
4609 There remain known problems when using certain characters with
4610 multi-character folds inside bracketed character classes, including such
4611 constructs as C<qr/[\N{LATIN SMALL LETTER SHARP}a-z]/i>. These
4612 remaining bugs are addressed in [perl #89774].
4613
4614 =item *
4615
4616 RT #78266: The regex engine has been leaking memory when accessing
4617 named captures that weren't matched as part of a regex ever since 5.10
4618 when they were introduced, e.g. this would consume over a hundred MB of
4619 memory:
4620
4621 for (1..10_000_000) {
4622 if ("foo" =~ /(foo|(?<capture>bar))?/) {
4623 my $capture = $+{capture}
4624 }
4625 }
4626 system "ps -o rss $$"'
4627
4628 =item *
4629
4630 In 5.14, C</[[:lower:]]/i> and C</[[:upper:]]/i> no longer matched the
4631 opposite case. This has been fixed [perl #101970].
4632
4633 =item *
4634
4635 A regular expression match with an overloaded object on the right-hand side
4636 would in some cases stringify the object too many times.
4637
4638 =item *
4639
4640 A regression has been fixed that was introduced in 5.14, in C</i>
4641 regular expression matching, in which a match improperly fails if the
4642 pattern is in UTF-8, the target string is not, and a Latin-1 character
4643 precedes a character in the string that should match the pattern.
4644 [perl #101710]
4645
4646 =item *
4647
4648 In case-insensitive regular expression pattern matching, no longer on
4649 UTF-8 encoded strings does the scan for the start of match only look at
4650 the first possible position. This caused matches such as
4651 C<"f\x{FB00}" =~ /ff/i> to fail.
4652
4653 =item *
4654
4655 The regexp optimiser no longer crashes on debugging builds when merging
4656 fixed-string nodes with inconvenient contents.
4657
4658 =item *
4659
4660 A panic involving the combination of the regular expression modifiers
4661 C</aa> and the C<\b> escape sequence introduced in 5.14.0 has been
4662 fixed [perl #95964].
4663
4664 =item *
4665
4666 The combination of the regular expression modifiers C</aa> and the C<\b>
4667 and C<\B> escape sequences did not work properly on UTF-8 encoded
4668 strings. All non-ASCII characters under C</aa> should be treated as
4669 non-word characters, but what was happening was that Unicode rules were
4670 used to determine wordness/non-wordness for non-ASCII characters. This
4671 is now fixed [perl #95968].
4672
4673 =item *
4674
4675 C<< (?foo: ...) >> no longer loses passed in character set.
4676
4677 =item *
4678
4679 The trie optimisation used to have problems with alternations containing
4680 an empty C<(?:)>, causing C<< "x" =~ /\A(?>(?:(?:)A|B|C?x))\z/ >> not to
4681 match, whereas it should [perl #111842].
4682
4683 =item *
4684
4685 Use of lexical (C<my>) variables in code blocks embedded in regular
4686 expressions will no longer result in memory corruption or crashes.
4687
4688 Nevertheless, these code blocks are still experimental, as there are still
4689 problems with the wrong variables being closed over (in loops for instance)
4690 and with abnormal exiting (e.g., C<die>) causing memory corruption.
4691
4692 =item *
4693
4694 The C<\h>, C<\H>, C<\v> and C<\V> regular expression metacharacters used to
4695 cause a panic error message when attempting to match at the end of the
4696 string [perl #96354].
4697
4698 =item *
4699
4700 The abbreviations for four C1 control characters C<MW> C<PM>, C<RI>, and
4701 C<ST> were previously unrecognized by C<\N{}>, vianame(), and
4702 string_vianame().
4703
4704 =item *
4705
4706 Mentioning a variable named "&" other than C<$&> (i.e., C<@&> or C<%&>) no
4707 longer stops C<$&> from working. The same applies to variables named "'"
4708 and "`" [perl #24237].
4709
4710 =item *
4711
4712 Creating a C<UNIVERSAL::AUTOLOAD> sub no longer stops C<%+>, C<%-> and
4713 C<%!> from working some of the time [perl #105024].
4714
4715 =back
4716
4717 =head2 Smartmatching
4718
4719 =over
4720
4721 =item *
4722
4723 C<~~> now correctly handles the precedence of Any~~Object, and is not tricked
4724 by an overloaded object on the left-hand side.
4725
4726 =item *
4727
4728 In Perl 5.14.0, C<$tainted ~~ @array> stopped working properly. Sometimes
4729 it would erroneously fail (when C<$tainted> contained a string that occurs
4730 in the array I<after> the first element) or erroneously succeed (when
4731 C<undef> occurred after the first element) [perl #93590].
4732
4733 =back
4734
4735 =head2 The C<sort> operator
4736
4737 =over
4738
4739 =item *
4740
4741 C<sort> was not treating C<sub {}> and C<sub {()}> as equivalent when
4742 such a sub was provided as the comparison routine. It used to croak on
4743 C<sub {()}>.
4744
4745 =item *
4746
4747 C<sort> now works once more with custom sort routines that are XSUBs. It
4748 stopped working in 5.10.0.
4749
4750 =item *
4751
4752 C<sort> with a constant for a custom sort routine, although it produces
4753 unsorted results, no longer crashes. It started crashing in 5.10.0.
4754
4755 =item *
4756
4757 Warnings emitted by C<sort> when a custom comparison routine returns a
4758 non-numeric value now contain "in sort" and show the line number of the
4759 C<sort> operator, rather than the last line of the comparison routine. The
4760 warnings also occur now only if warnings are enabled in the scope where
4761 C<sort> occurs. Previously the warnings would occur if enabled in the
4762 comparison routine's scope.
4763
4764 =item *
4765
4766 C<< sort { $a <=> $b } >>, which is optimised internally, now produces
4767 "uninitialized" warnings for NaNs (not-a-number values), since C<< <=> >>
4768 returns C<undef> for those. This brings it in line with
4769 S<C<< sort { 1; $a <=> $b } >>> and other more complex cases, which are not
4770 optimised [perl #94390].
4771
4772 =back
4773
4774 =head2 The C<substr> operator
4775
4776 =over
4777
4778 =item *
4779
4780 Tied (and otherwise magical) variables are no longer exempt from the
4781 "Attempt to use reference as lvalue in substr" warning.
4782
4783 =item *
4784
4785 That warning now occurs when the returned lvalue is assigned to, not
4786 when C<substr> itself is called. This only makes a difference if the
4787 return value of C<substr> is referenced and assigned to later.
4788
4789 =item *
4790
4791 Passing a substring of a read-only value or a typeglob to a function
4792 (potential lvalue context) no longer causes an immediate "Can't coerce"
4793 or "Modification of a read-only value" error. That error only occurs
4794 if and when the value passed is assigned to.
4795
4796 The same thing happens with the "substr outside of string" error. If
4797 the lvalue is only read, not written to, it is now just a warning, as
4798 with rvalue C<substr>.
4799
4800 =item *
4801
4802 C<substr> assignments no longer call FETCH twice if the first argument
4803 is a tied variable, just once.
4804
4805 =back
4806
4807 =head2 Support for embedded nulls
4808
4809 Some parts of Perl did not work correctly with nulls (C<chr 0>) embedded in
4810 strings. That meant that, for instance, C<< $m = "a\0b"; foo->$m >> would
4811 call the "a" method, instead of the actual method name contained in $m.
4812 These parts of perl have been fixed to support nulls:
4813
4814 =over
4815
4816 =item *
4817
4818 Method names
4819
4820 =item *
4821
4822 Typeglob names (including filehandle and subroutine names)
4823
4824 =item *
4825
4826 Package names, including the return value of C<ref()>
4827
4828 =item *
4829
4830 Typeglob elements (C<*foo{"THING\0stuff"}>)
4831
4832 =item *
4833
4834 Signal names
4835
4836 =item *
4837
4838 Various warnings and error messages that mention variable names or values,
4839 methods, etc.
4840
4841 =back
4842
4843 One side effect of these changes is that blessing into "\0" no longer
4844 causes C<ref()> to return false.
4845
4846 =head2 Threading bugs
4847
4848 =over
4849
4850 =item *
4851
4852 Typeglobs returned from threads are no longer cloned if the parent thread
4853 already has a glob with the same name. This means that returned
4854 subroutines will now assign to the right package variables [perl #107366].
4855
4856 =item *
4857
4858 Some cases of threads crashing due to memory allocation during cloning have
4859 been fixed [perl #90006].
4860
4861 =item *
4862
4863 Thread joining would sometimes emit "Attempt to free unreferenced scalar"
4864 warnings if C<caller> had been used from the C<DB> package prior to thread
4865 creation [perl #98092].
4866
4867 =item *
4868
4869 Locking a subroutine (via C<lock &sub>) is no longer a compile-time error
4870 for regular subs. For lvalue subroutines, it no longer tries to return the
4871 sub as a scalar, resulting in strange side effects like C<ref \$_>
4872 returning "CODE" in some instances.
4873
4874 C<lock &sub> is now a run-time error if L<threads::shared> is loaded (a
4875 no-op otherwise), but that may be rectified in a future version.
4876
4877 =back
4878
4879 =head2 Tied variables
4880
4881 =over
4882
4883 =item *
4884
4885 Various cases in which FETCH was being ignored or called too many times
4886 have been fixed:
4887
4888 =over
4889
4890 =item *
4891
4892 C<PerlIO::get_layers> [perl #97956]
4893
4894 =item *
4895
4896 C<$tied =~ y/a/b/>, C<chop $tied> and C<chomp $tied> when $tied holds a
4897 reference.
4898
4899 =item *
4900
4901 When calling C<local $_> [perl #105912]
4902
4903 =item *
4904
4905 Four-argument C<select>
4906
4907 =item *
4908
4909 A tied buffer passed to C<sysread>
4910
4911 =item *
4912
4913 C<< $tied .= <> >>
4914
4915 =item *
4916
4917 Three-argument C<open>, the third being a tied file handle
4918 (as in C<< open $fh, ">&", $tied >>)
4919
4920 =item *
4921
4922 C<sort> with a reference to a tied glob for the comparison routine.
4923
4924 =item *
4925
4926 C<..> and C<...> in list context [perl #53554].
4927
4928 =item *
4929
4930 C<${$tied}>, C<@{$tied}>, C<%{$tied}> and C<*{$tied}> where the tied
4931 variable returns a string (C<&{}> was unaffected)
4932
4933 =item *
4934
4935 C<defined ${ $tied_variable }>
4936
4937 =item *
4938
4939 Various functions that take a filehandle argument in rvalue context
4940 (C<close>, C<readline>, etc.) [perl #97482]
4941
4942 =item *
4943
4944 Some cases of dereferencing a complex expression, such as
4945 C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
4946 it once.
4947
4948 =item *
4949
4950 C<$tied-E<gt>method> where $tied returns a package name--even resulting in
4951 a failure to call the method, due to memory corruption
4952
4953 =item *
4954
4955 Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied>
4956
4957 =item *
4958
4959 C<chdir>, C<chmod>, C<chown>, C<utime>, C<truncate>, C<stat>, C<lstat> and
4960 the filetest ops (C<-r>, C<-x>, etc.)
4961
4962 =back
4963
4964 =item *
4965
4966 C<caller> sets C<@DB::args> to the subroutine arguments when called from
4967 the DB package. It used to crash when doing so if C<@DB::args> happened to
4968 be tied. Now it croaks instead.
4969
4970 =item *
4971
4972 Tying an element of %ENV or C<%^H> and then deleting that element would
4973 result in a call to the tie object's DELETE method, even though tying the
4974 element itself is supposed to be equivalent to tying a scalar (the element
4975 is, of course, a scalar) [perl #67490].
4976
4977 =item *
4978
4979 When Perl autovivifies an element of a tied array or hash (which entails
4980 calling STORE with a new reference), it now calls FETCH immediately after
4981 the STORE, instead of assuming that FETCH would have returned the same
4982 reference. This can make it easier to implement tied objects [perl #35865, #43011].
4983
4984 =item *
4985
4986 Four-argument C<select> no longer produces its "Non-string passed as
4987 bitmask" warning on tied or tainted variables that are strings.
4988
4989 =item *
4990
4991 Localising a tied scalar that returns a typeglob no longer stops it from
4992 being tied till the end of the scope.
4993
4994 =item *
4995
4996 Attempting to C<goto> out of a tied handle method used to cause memory
4997 corruption or crashes. Now it produces an error message instead
4998 [perl #8611].
4999
5000 =item *
5001
5002 A bug has been fixed that occurs when a tied variable is used as a
5003 subroutine reference: if the last thing assigned to or returned from the
5004 variable was a reference or typeglob, the C<\&$tied> could either crash or
5005 return the wrong subroutine. The reference case is a regression introduced
5006 in Perl 5.10.0. For typeglobs, it has probably never worked till now.
5007
5008 =back
5009
5010 =head2 Version objects and vstrings
5011
5012 =over
5013
5014 =item *
5015
5016 The bitwise complement operator (and possibly other operators, too) when
5017 passed a vstring would leave vstring magic attached to the return value,
5018 even though the string had changed. This meant that
5019 C<< version->new(~v1.2.3) >> would create a version looking like "v1.2.3"
5020 even though the string passed to C<< version->new >> was actually
5021 "\376\375\374". This also caused L<B::Deparse> to deparse C<~v1.2.3>
5022 incorrectly, without the C<~> [perl #29070].
5023
5024 =item *
5025
5026 Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then
5027 assigning something else used to blow away all the magic. This meant that
5028 tied variables would come undone, C<$!> would stop getting updated on
5029 failed system calls, C<$|> would stop setting autoflush, and other
5030 mischief would take place. This has been fixed.
5031
5032 =item *
5033
5034 C<< version->new("version") >> and C<printf "%vd", "version"> no longer
5035 crash [perl #102586].
5036
5037 =item *
5038
5039 Version comparisons, such as those that happen implicitly with C<use
5040 v5.43>, no longer cause locale settings to change [perl #105784].
5041
5042 =item *
5043
5044 Version objects no longer cause memory leaks in boolean context
5045 [perl #109762].
5046
5047 =back
5048
5049 =head2 Warnings, redefinition
5050
5051 =over
5052
5053 =item *
5054
5055 Subroutines from the C<autouse> namespace are once more exempt from
5056 redefinition warnings. This used to work in 5.005, but was broken in
5057 5.6 for most subroutines. For subs created via XS that redefine
5058 subroutines from the C<autouse> package, this stopped working in 5.10.
5059
5060 =item *
5061
5062 New XSUBs now produce redefinition warnings if they overwrite existing
5063 subs, as they did in 5.8.x. (The C<autouse> logic was reversed in
5064 5.10-14. Only subroutines from the C<autouse> namespace would warn
5065 when clobbered.)
5066
5067 =item *
5068
5069 C<newCONSTSUB> used to use compile-time warning hints, instead of
5070 run-time hints. The following code should never produce a redefinition
5071 warning, but it used to, if C<newCONSTSUB> redefined an existing
5072 subroutine:
5073
5074 use warnings;
5075 BEGIN {
5076 no warnings;
5077 some_XS_function_that_calls_new_CONSTSUB();
5078 }
5079
5080 =item *
5081
5082 Redefinition warnings for constant subroutines are on by default (what
5083 are known as severe warnings in L<perldiag>). This was only the case
5084 when it was a glob assignment or declaration of a Perl subroutine that
5085 caused the warning. If the creation of XSUBs triggered the warning, it
5086 was not a default warning. This has been corrected.
5087
5088 =item *
5089
5090 The internal check to see whether a redefinition warning should occur
5091 used to emit "uninitialized" warnings in cases like this:
5092
5093 use warnings "uninitialized";
5094 use constant {u => undef, v => undef};
5095 sub foo(){u}
5096 sub foo(){v}
5097
5098 =back
5099
5100 =head2 Warnings, "Uninitialized"
5101
5102 =over
5103
5104 =item *
5105
5106 Various functions that take a filehandle argument in rvalue context
5107 (C<close>, C<readline>, etc.) used to warn twice for an undefined handle
5108 [perl #97482].
5109
5110 =item *
5111
5112 C<dbmopen> now only warns once, rather than three times, if the mode
5113 argument is C<undef> [perl #90064].
5114
5115 =item *
5116
5117 The C<+=> operator does not usually warn when the left-hand side is
5118 C<undef>, but it was doing so for tied variables. This has been fixed
5119 [perl #44895].
5120
5121 =item *
5122
5123 A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized"
5124 warnings to report the wrong variable if the operator in question had
5125 two operands and one was C<%{...}> or C<@{...}>. This has been fixed
5126 [perl #103766].
5127
5128 =item *
5129
5130 C<..> and C<...> in list context now mention the name of the variable in
5131 "uninitialized" warnings for string (as opposed to numeric) ranges.
5132
5133 =back
5134
5135 =head2 Weak references
5136
5137 =over
5138
5139 =item *
5140
5141 Weakening the first argument to an automatically-invoked C<DESTROY> method
5142 could result in erroneous "DESTROY created new reference" errors or
5143 crashes. Now it is an error to weaken a read-only reference.
5144
5145 =item *
5146
5147 Weak references to lexical hashes going out of scope were not going stale
5148 (becoming undefined), but continued to point to the hash.
5149
5150 =item *
5151
5152 Weak references to lexical variables going out of scope are now broken
5153 before any magical methods (e.g., DESTROY on a tie object) are called.
5154 This prevents such methods from modifying the variable that will be seen
5155 the next time the scope is entered.
5156
5157 =item *
5158
5159 Creating a weak reference to an @ISA array or accessing the array index
5160 (C<$#ISA>) could result in confused internal bookkeeping for elements
5161 subsequently added to the @ISA array. For instance, creating a weak
5162 reference to the element itself could push that weak reference on to @ISA;
5163 and elements added after use of C<$#ISA> would be ignored by method lookup
5164 [perl #85670].
5165
5166 =back
5167
5168 =head2 Other notable fixes
5169
5170 =over
5171
5172 =item *
5173
5174 C<quotemeta> now quotes consistently the same non-ASCII characters under
5175 C<use feature 'unicode_strings'>, regardless of whether the string is
5176 encoded in UTF-8 or not, hence fixing the last vestiges (we hope) of the
5177 infamous L<perlunicode/The "Unicode Bug">. [perl #77654].
5178
5179 Which of these code points is quoted has changed, based on Unicode's
5180 recommendations. See L<perlfunc/quotemeta> for details.
5181
5182 =item *
5183
5184 When one writes C<open foo || die>, which used to work in Perl 4, a
5185 "Precedence problem" warning is produced. This warning used erroneously to
5186 apply to fully-qualified bareword handle names not followed by C<||>. This
5187 has been corrected.
5188
5189 =item *
5190
5191 After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument
5192 would sometimes return a name that could not be used to refer to the
5193 filehandle, or sometimes it would return C<undef> even when a filehandle
5194 was selected. Now it returns a typeglob reference in such cases.
5195
5196 =item *
5197
5198 C<PerlIO::get_layers> no longer ignores some arguments that it thinks are
5199 numeric, while treating others as filehandle names. It is now consistent
5200 for flat scalars (i.e., not references).
5201
5202 =item *
5203
5204 Unrecognised switches on C<#!> line
5205
5206 If a switch, such as B<-x>, that cannot occur on the C<#!> line is used
5207 there, perl dies with "Can't emulate...".
5208
5209 It used to produce the same message for switches that perl did not
5210 recognise at all, whether on the command line or the C<#!> line.
5211
5212 Now it produces the "Unrecognized switch" error message [perl #104288].
5213
5214 =item *
5215
5216 C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the
5217 signal handler from stealing the exit status [perl #105700].
5218
5219 =item *
5220
5221 The %n formatting code for C<printf> and C<sprintf>, which causes the number
5222 of characters to be assigned to the next argument, now actually
5223 assigns the number of characters, instead of the number of bytes.
5224
5225 It also works now with special lvalue functions like C<substr> and with
5226 nonexistent hash and array elements [perl #3471, #103492].
5227
5228 =item *
5229
5230 Perl skips copying values returned from a subroutine, for the sake of
5231 speed, if doing so would make no observable difference. Due to faulty
5232 logic, this would happen with the
5233 result of C<delete>, C<shift> or C<splice>, even if the result was
5234 referenced elsewhere. It also did so with tied variables about to be freed
5235 [perl #91844, #95548].
5236
5237 =item *
5238
5239 C<utf8::decode> now refuses to modify read-only scalars [perl #91850].
5240
5241 =item *
5242
5243 Freeing $_ inside a C<grep> or C<map> block, a code block embedded in a
5244 regular expression, or an @INC filter (a subroutine returned by a
5245 subroutine in @INC) used to result in double frees or crashes
5246 [perl #91880, #92254, #92256].
5247
5248 =item *
5249
5250 C<eval> returns C<undef> in scalar context or an empty list in list
5251 context when there is a run-time error. When C<eval> was passed a
5252 string in list context and a syntax error occurred, it used to return a
5253 list containing a single undefined element. Now it returns an empty
5254 list in list context for all errors [perl #80630].
5255
5256 =item *
5257
5258 C<goto &func> no longer crashes, but produces an error message, when
5259 the unwinding of the current subroutine's scope fires a destructor that
5260 undefines the subroutine being "goneto" [perl #99850].
5261
5262 =item *
5263
5264 Perl now holds an extra reference count on the package that code is
5265 currently compiling in. This means that the following code no longer
5266 crashes [perl #101486]:
5267
5268 package Foo;
5269 BEGIN {*Foo:: = *Bar::}
5270 sub foo;
5271
5272 =item *
5273
5274 The C<x> repetition operator no longer crashes on 64-bit builds with large
5275 repeat counts [perl #94560].
5276
5277 =item *
5278
5279 Calling C<require> on an implicit C<$_> when C<*CORE::GLOBAL::require> has
5280 been overridden does not segfault anymore, and C<$_> is now passed to the
5281 overriding subroutine [perl #78260].
5282
5283 =item *
5284
5285 C<use> and C<require> are no longer affected by the I/O layers active in
5286 the caller's scope (enabled by L<open.pm|open>) [perl #96008].
5287
5288 =item *
5289
5290 C<our $::é; $é> (which is invalid) no longer produces the "Compilation
5291 error at lib/utf8_heavy.pl..." error message, which it started emitting in
5292 5.10.0 [perl #99984].
5293
5294 =item *
5295
5296 On 64-bit systems, C<read()> now understands large string offsets beyond
5297 the 32-bit range.
5298
5299 =item *
5300
5301 Errors that occur when processing subroutine attributes no longer cause the
5302 subroutine's op tree to leak.
5303
5304 =item *
5305
5306 Passing the same constant subroutine to both C<index> and C<formline> no
5307 longer causes one or the other to fail [perl #89218]. (5.14.1)
5308
5309 =item *
5310
5311 List assignment to lexical variables declared with attributes in the same
5312 statement (C<my ($x,@y) : blimp = (72,94)>) stopped working in Perl 5.8.0.
5313 It has now been fixed.
5314
5315 =item *
5316
5317 Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of
5318 a pack template equivalent to "U0" if the input string was empty. This has
5319 been fixed [perl #90160].
5320
5321 =item *
5322
5323 Destructors on objects were not called during global destruction on objects
5324 that were not referenced by any scalars. This could happen if an array
5325 element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
5326 blessed variable (C<bless \my @a; sub foo { @a }>).
5327
5328 Now there is an extra pass during global destruction to fire destructors on
5329 any objects that might be left after the usual passes that check for
5330 objects referenced by scalars [perl #36347].
5331
5332 =item *
5333
5334 Fixed a case where it was possible that a freed buffer may have been read
5335 from when parsing a here document [perl #90128]. (5.14.1)
5336
5337 =item *
5338
5339 C<each(I<ARRAY>)> is now wrapped in C<defined(...)>, like C<each(I<HASH>)>,
5340 inside a C<while> condition [perl #90888].
5341
5342 =item *
5343
5344 A problem with context propagation when a C<do> block is an argument to
5345 C<return> has been fixed. It used to cause C<undef> to be returned in
5346 some cases of a C<return> inside an C<if> block which itself is followed by
5347 another C<return>.
5348
5349 =item *
5350
5351 Calling C<index> with a tainted constant no longer causes constants in
5352 subsequently compiled code to become tainted [perl #64804].
5353
5354 =item *
5355
5356 Infinite loops like C<1 while 1> used to stop C<strict 'subs'> mode from
5357 working for the rest of the block.t
5358
5359 =item *
5360
5361 For list assignments like C<($a,$b) = ($b,$a)>, Perl has to make a copy of
5362 the items on the right-hand side before assignment them to the left. For
5363 efficiency's sake, it assigns the values on the right straight to the items
5364 on the left if no one variable is mentioned on both sides, as in C<($a,$b) =
5365 ($c,$d)>. The logic for determining when it can cheat was faulty, in that
5366 C<&&> and C<||> on the right-hand side could fool it. So C<($a,$b) =
5367 $some_true_value && ($b,$a)> would end up assigning the value of C<$b> to
5368 both scalars.
5369
5370 =item *
5371
5372 Perl no longer tries to apply lvalue context to the string in
5373 C<("string", $variable) ||= 1> (which used to be an error). Since the
5374 left-hand side of C<||=> is evaluated in scalar context, that's a scalar
5375 comma operator, which gives all but the last item void context. There is
5376 no such thing as void lvalue context, so it was a mistake for Perl to try
5377 to force it [perl #96942].
5378
5379 =item *
5380
5381 C<caller> no longer leaks memory when called from the DB package if
5382 C<@DB::args> was assigned to after the first call to C<caller>. L<Carp>
5383 was triggering this bug [perl #97010].
5384
5385 =item *
5386
5387 C<close> and similar filehandle functions, when called on built-in global
5388 variables (like C<$+>), used to die if the variable happened to hold the
5389 undefined value, instead of producing the usual "Use of uninitialized
5390 value" warning.
5391
5392 =item *
5393
5394 When autovivified file handles were introduced in Perl 5.6.0, C<readline>
5395 was inadvertently made to autovivify when called as C<readline($foo)> (but
5396 not as C<E<lt>$fooE<gt>>). It has now been fixed never to autovivify.
5397
5398 =item *
5399
5400 Calling an undefined anonymous subroutine (e.g., what $x holds after
5401 C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
5402 has been corrected to "Undefined subroutine called" [perl #71154].
5403
5404 =item *
5405
5406 Causing C<@DB::args> to be freed between uses of C<caller> no longer
5407 results in a crash [perl #93320].
5408
5409 =item *
5410
5411 C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
5412 C<setpgrp> was ignoring its argument if there was just one. Now it is
5413 equivalent to C<setpgrp($foo,0)>.
5414
5415 =item *
5416
5417 C<shmread> was not setting the scalar flags correctly when reading from
5418 shared memory, causing the existing cached numeric representation in the
5419 scalar to persist [perl #98480].
5420
5421 =item *
5422
5423 C<++> and C<--> now work on copies of globs, instead of dying.
5424
5425 =item *
5426
5427 C<splice()> doesn't warn when truncating
5428
5429 You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
5430 worrying about warnings.
5431
5432 =item *
5433
5434 C<< $$ >> is no longer tainted. Since this value comes directly from
5435 C<< getpid() >>, it is always safe.
5436
5437 =item *
5438
5439 The parser no longer leaks a filehandle if STDIN was closed before parsing
5440 started [perl #37033].
5441
5442 =item *
5443
5444 C<< die; >> with a non-reference, non-string, or magical (e.g., tainted)
5445 value in $@ now properly propagates that value [perl #111654].
5446
5447 =back
5448
5449 =head1 Known Problems
5450
5451 =over 4
5452
5453 =item *
5454
5455 On Solaris, we have two kinds of failure.
5456
5457 If F<make> is Sun's F<make≥>, we get an error about a badly formed macro
5458 assignment in the F<Makefile>. That happens when F<./Configure> tries to
5459 make depends. F<Configure> then exits 0, but further F<make>-ing fails.
5460
5461 If F<make> is F<gmake>, F<Configure> completes, then we get errors related
5462 to F</usr/include/stdbool.h>
5463
5464 =item *
5465
5466 The following CPAN modules have test failures with perl 5.16. Patches have
5467 been submitted for all of these, so hopefully there will be new releases
5468 soon:
5469
5470 =over
5471
5472 =item *
5473
5474 L<Date::Pcalc> version 6.1
5475
5476 =item *
5477
5478 L<Module::CPANTS::Analyse> version 0.85
5479
5480 This fails due to problems in L<Module::Find> 0.10 and L<File::MMagic>
5481 1.27.
5482
5483 =item *
5484
5485 L<PerlIO::Util> version 0.72
5486
5487 =back
5488
5489 =back
5490
5491 =head1 Acknowledgements
5492
5493 XXX Generate this with:
5494
5495 perl Porting/acknowledgements.pl v5.14.0..HEAD
5496
5497 =head1 Reporting Bugs
5498
5499 If you find what you think is a bug, you might check the articles
5500 recently posted to the comp.lang.perl.misc newsgroup and the perl
5501 bug database at L<http://rt.perl.org/perlbug/>. There may also be
5502 information at L<http://www.perl.org/>, the Perl Home Page.
5503
5504 If you believe you have an unreported bug, please run the L<perlbug>
5505 program included with your release. Be sure to trim your bug down
5506 to a tiny but sufficient test case. Your bug report, along with the
5507 output of C<perl -V>, will be sent off to perlbug@perl.org to be
5508 analysed by the Perl porting team.
5509
5510 If the bug you are reporting has security implications, which make it
5511 inappropriate to send to a publicly archived mailing list, then please
5512 send it to perl5-security-report@perl.org. This points to a closed
5513 subscription unarchived mailing list, which includes all the core
5514 committers, who will be able to help assess the impact of issues, figure
5515 out a resolution, and help co-ordinate the release of patches to
5516 mitigate or fix the problem across all platforms on which Perl is
5517 supported. Please only use this address for security issues in the Perl
5518 core, not for modules independently distributed on CPAN.
5519
5520 =head1 SEE ALSO
5521
5522 The F<Changes> file for an explanation of how to view exhaustive details
5523 on what changed.
5524
5525 The F<INSTALL> file for how to build Perl.
5526
5527 The F<README> file for general stuff.
5528
5529 The F<Artistic> and F<Copying> files for copyright information.
5530
5531 =cut

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26