perldeprecation >
5.26.1
との差分
perldeprecation 5.26.1 と 5.32.0 の差分
1 | 1 | |
2 | 2 | =encoding euc-jp |
3 | 3 | |
4 | 4 | =head1 NAME |
5 | 5 | |
6 | 6 | =begin original |
7 | 7 | |
8 | 8 | perldeprecation - list Perl deprecations |
9 | 9 | |
10 | 10 | =end original |
11 | 11 | |
12 | 12 | perldeprecation - Perl の廃止予定の一覧 |
13 | 13 | |
14 | 14 | =head1 DESCRIPTION |
15 | 15 | |
16 | 16 | =begin original |
17 | 17 | |
18 | 18 | The purpose of this document is to document what has been deprecated |
19 | 19 | in Perl, and by which version the deprecated feature will disappear, |
20 | 20 | or, for already removed features, when it was removed. |
21 | 21 | |
22 | 22 | =end original |
23 | 23 | |
24 | 24 | この文書の目的は、Perl で何が廃止予定になったか、どのバージョンで |
25 | 25 | 廃止予定の機能が消滅したか、あるいは既に削除された機能については、 |
26 | 26 | いつ削除されたかを文書化することです。 |
27 | 27 | |
28 | 28 | =begin original |
29 | 29 | |
30 | 30 | This document will try to discuss what alternatives for the deprecated |
31 | 31 | features are available. |
32 | 32 | |
33 | 33 | =end original |
34 | 34 | |
35 | 35 | この文書は、廃止予定の機能についてどんな代替案が利用可能かについて |
36 | 36 | 議論しようとしています。 |
37 | 37 | |
38 | 38 | =begin original |
39 | 39 | |
40 | 40 | The deprecated features will be grouped by the version of Perl in |
41 | 41 | which they will be removed. |
42 | 42 | |
43 | 43 | =end original |
44 | 44 | |
45 | 45 | 廃止予定の機能は、削除される予定の Perl のバージョン毎に |
46 | 46 | グループ分けされています。 |
47 | 47 | |
48 | =head2 Perl 5.34 | |
49 | ||
50 | =begin original | |
51 | ||
52 | There are no deprecations or fatalizations scheduled for Perl 5.34. | |
53 | ||
54 | =end original | |
55 | ||
56 | Perl 5.34 で計画されている廃止予定や致命的エラー化はありません。 | |
57 | ||
48 | 58 | =head2 Perl 5.32 |
49 | 59 | |
50 | 60 | =head3 Constants from lexical variables potentially modified elsewhere |
51 | 61 | |
52 | 62 | (レキシカル変数からの定数が潜在的にどこからでも変更可能) |
53 | 63 | |
54 | 64 | =begin original |
55 | 65 | |
56 | 66 | You wrote something like |
57 | 67 | |
58 | 68 | =end original |
59 | 69 | |
60 | 70 | 次のように書きました: |
61 | 71 | |
62 | 72 | my $var; |
63 | 73 | $sub = sub () { $var }; |
64 | 74 | |
65 | 75 | =begin original |
66 | 76 | |
67 | 77 | but $var is referenced elsewhere and could be modified after the C<sub> |
68 | 78 | expression is evaluated. Either it is explicitly modified elsewhere |
69 | 79 | (C<$var = 3>) or it is passed to a subroutine or to an operator like |
70 | 80 | C<printf> or C<map>, which may or may not modify the variable. |
71 | 81 | |
72 | 82 | =end original |
73 | 83 | |
74 | 84 | しかし $var はどこかで参照されていて、 |
75 | 85 | C<sub> 式が評価された後に変更されるかもしれません。 |
76 | 86 | これは、明示的に他の場所から変更されたり (C<$var = 3>)、 |
77 | 87 | 変数を変更するかもしれないしされないかもしれない |
78 | 88 | C<printf> や C<map> のような演算子やサブルーチンに |
79 | 89 | 渡されることによります。 |
80 | 90 | |
81 | 91 | =begin original |
82 | 92 | |
83 | 93 | Traditionally, Perl has captured the value of the variable at that |
84 | 94 | point and turned the subroutine into a constant eligible for inlining. |
85 | 95 | In those cases where the variable can be modified elsewhere, this |
86 | 96 | breaks the behavior of closures, in which the subroutine captures |
87 | 97 | the variable itself, rather than its value, so future changes to the |
88 | 98 | variable are reflected in the subroutine's return value. |
89 | 99 | |
90 | 100 | =end original |
91 | 101 | |
92 | 102 | 伝統的に、Perl はこの時点で変数の値を捕捉して、 |
93 | 103 | サブルーチンをインライン化可能な定数に変えます。 |
94 | 104 | 変数が他の場所で変更できる場合、これはクロージャの振る舞いを壊します; |
95 | 105 | サブルーチンはその値ではなく変数そのものを捕捉するからです; |
96 | 106 | 従って、将来の変数への変更はサブルーチンの返り値に反映されます。 |
97 | 107 | |
98 | 108 | =begin original |
99 | 109 | |
100 | 110 | If you intended for the subroutine to be eligible for inlining, then |
101 | 111 | make sure the variable is not referenced elsewhere, possibly by |
102 | 112 | copying it: |
103 | 113 | |
104 | 114 | =end original |
105 | 115 | |
106 | 116 | サブルーチンをインライン化可能にすることを意図している場合は、 |
107 | 117 | おそらくコピーすることによって、変数がどこからも |
108 | 118 | 参照されていないようにしてください: |
109 | 119 | |
110 | 120 | my $var2 = $var; |
111 | 121 | $sub = sub () { $var2 }; |
112 | 122 | |
113 | 123 | =begin original |
114 | 124 | |
115 | 125 | If you do want this subroutine to be a closure that reflects future |
116 | 126 | changes to the variable that it closes over, add an explicit C<return>: |
117 | 127 | |
118 | 128 | =end original |
119 | 129 | |
120 | 130 | このサブルーチンを、閉じた変数の将来の変更を反映するクロージャにしたい場合は、 |
121 | 131 | 明示的な C<return> を追加してください: |
122 | 132 | |
123 | 133 | my $var; |
124 | 134 | $sub = sub () { return $var }; |
125 | 135 | |
126 | 136 | =begin original |
127 | 137 | |
128 | This usage | |
138 | This usage was deprecated and as of Perl 5.32 is no longer allowed. | |
129 | 139 | |
130 | 140 | =end original |
131 | 141 | |
132 | この使用法は廃止予定で、Perl 5.32 以降は許されません。 | |
142 | この使用法は廃止予定で、Perl 5.32 以降ではもはや許されません。 | |
133 | 143 | |
144 | =head3 Use of strings with code points over 0xFF as arguments to C<vec> | |
145 | ||
146 | (C<vec> の引数として 0xFF を超える符号位置の文字列の使用) | |
147 | ||
148 | =begin original | |
149 | ||
150 | C<vec> views its string argument as a sequence of bits. A string | |
151 | containing a code point over 0xFF is nonsensical. This usage is | |
152 | deprecated in Perl 5.28, and was removed in Perl 5.32. | |
153 | ||
154 | =end original | |
155 | ||
156 | C<vec> はその文字列引数をビット列として見ます。 | |
157 | 0xFF を超える符号位置を含む文字列は意味がありません。 | |
158 | この使用法は Perl 5.28 で廃止予定になり、 | |
159 | Perl 5.32 で削除されました。 | |
160 | ||
161 | =head3 Use of code points over 0xFF in string bitwise operators | |
162 | ||
163 | (ビット単位文字列演算子での 0xFF を超える符号位置の使用) | |
164 | ||
165 | =begin original | |
166 | ||
167 | The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat their | |
168 | operands as strings of bytes. As such, values above 0xFF are | |
169 | nonsensical. Some instances of these have been deprecated since Perl | |
170 | 5.24, and were made fatal in 5.28, but it turns out that in cases where | |
171 | the wide characters did not affect the end result, no deprecation | |
172 | notice was raised, and so remain legal. Now, all occurrences either are | |
173 | fatal or raise a deprecation warning, so that the remaining legal | |
174 | occurrences became fatal in 5.32. | |
175 | ||
176 | =end original | |
177 | ||
178 | ビット単位文字列演算子 C<&>, C<|>, C<^>, C<~> は、そのオペランドを | |
179 | バイトの文字列として扱います。 | |
180 | 従って0xFF を超える値は意味がありません。 | |
181 | これらの恥部は Perl 5.24 から廃止予定で、5.28 で致命的エラーになりましたが、 | |
182 | ワイド文字が最終結果に影響を与えない場合、 | |
183 | 廃止予定警告は出力されず、従って正当なまま残っていることが分かりました。 | |
184 | 今回、こえらの全ては致命的エラーか廃止予定警告が出るようになり、 | |
185 | 残っている正当な場合は 5.32 で致命的エラーになりました。 | |
186 | ||
187 | =begin original | |
188 | ||
189 | An example of this is | |
190 | ||
191 | =end original | |
192 | ||
193 | この例は: | |
194 | ||
195 | "" & "\x{100}" | |
196 | ||
197 | =begin original | |
198 | ||
199 | The wide character is not used in the C<&> operation because the left | |
200 | operand is shorter. This now throws an exception. | |
201 | ||
202 | =end original | |
203 | ||
204 | ワイド文字は C<&> 演算では使われません; | |
205 | 左オペランドはより短いからです。 | |
206 | どちらにしろこれは例外を投げるようになりました。 | |
207 | ||
208 | =head3 hostname() doesn't accept any arguments | |
209 | ||
210 | (hostname() は引数を取りません) | |
211 | ||
212 | =begin original | |
213 | ||
214 | The function C<hostname()> in the L<Sys::Hostname> module has always | |
215 | been documented to be called with no arguments. Historically it has not | |
216 | enforced this, and has actually accepted and ignored any arguments. As a | |
217 | result, some users have got the mistaken impression that an argument does | |
218 | something useful. To avoid these bugs, the function is being made strict. | |
219 | Passing arguments was deprecated in Perl 5.28 and became fatal in Perl 5.32. | |
220 | ||
221 | =end original | |
222 | ||
223 | L<Sys::Hostname> モジュールの C<hostname()> 関数は、 | |
224 | 引数なしで呼び出されると常に文書化されていました。 | |
225 | 歴史的にはこれは強制されておらず、実際に引数を受け付けて、 | |
226 | 全て無視していました。 | |
227 | 結果として、引数が何か有用であるという間違った印象を | |
228 | 一部のユーザーに与えていました。 | |
229 | これらのバグを避けるために、この関数はより厳密になりました。 | |
230 | 引数を渡すのは Perl 5.28 で廃止予定になり、 | |
231 | Perl 5.32 で致命的エラーになりました。 | |
232 | ||
233 | =head3 Unescaped left braces in regular expressions | |
234 | ||
235 | (正規表現中のエスケープされない左中かっこ) | |
236 | ||
237 | =begin original | |
238 | ||
239 | The simple rule to remember, if you want to match a literal C<{> | |
240 | character (U+007B C<LEFT CURLY BRACKET>) in a regular expression | |
241 | pattern, is to escape each literal instance of it in some way. | |
242 | Generally easiest is to precede it with a backslash, like C<\{> | |
243 | or enclose it in square brackets (C<[{]>). If the pattern | |
244 | delimiters are also braces, any matching right brace (C<}>) should | |
245 | also be escaped to avoid confusing the parser, for example, | |
246 | ||
247 | =end original | |
248 | ||
249 | 正規表現パターン中でリテラルな | |
250 | C<{> 文字 (U+007B C<LEFT CURLY BRACKET>) にマッチングしたい場合、 | |
251 | 覚えるべき単純な規則は、何らかの形でそれぞれのリテラルな実体を | |
252 | エスケープすることです。 | |
253 | 一般的に最も簡単な方法は、C<\{> のように逆スラッシュを前置するか、 | |
254 | 大かっこで囲む (C<[{]>) ことです。 | |
255 | パターン区切り文字も中かっこなら、例えばパーサの混乱を避けるために、 | |
256 | マッチングする右中かっこ (C<}>) もエスケープするべきです。 | |
257 | ||
258 | qr{abc\{def\}ghi} | |
259 | ||
260 | =begin original | |
261 | ||
262 | Forcing literal C<{> characters to be escaped will enable the Perl | |
263 | language to be extended in various ways in future releases. To avoid | |
264 | needlessly breaking existing code, the restriction is not enforced in | |
265 | contexts where there are unlikely to ever be extensions that could | |
266 | conflict with the use there of C<{> as a literal. A non-deprecation | |
267 | warning that the left brace is being taken literally is raised in | |
268 | contexts where there could be confusion about it. | |
269 | ||
270 | =end original | |
271 | ||
272 | リテラルな C<{> 文字のエスケープの強制は、 | |
273 | Perl 言語が将来のリリースで様々な方法で拡張できるようにするためにします。 | |
274 | 既存のコードを不必要に壊すのを避けるために、この制限は、 | |
275 | C<{> をリテラルとして使うことと衝突する拡張がなさそうな部分では | |
276 | 強制されません。 | |
277 | 左中かっこがリテラルに取られているときの非廃止予定警告は、 | |
278 | それが混乱するかも知れない文脈で発生します。 | |
279 | ||
280 | =begin original | |
281 | ||
282 | Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it | |
283 | started to give deprecation warnings since. These cases were made fatal | |
284 | in Perl 5.26. Due to an oversight, not all cases of a use of a literal | |
285 | C<{> got a deprecation warning. Some cases started warning in Perl 5.26, | |
286 | and were made fatal in Perl 5.30. Other cases started in Perl 5.28, | |
287 | and were made fatal in 5.32. | |
288 | ||
289 | =end original | |
290 | ||
291 | C<{> のリテラルな使用は Perl 5.20 に廃止予定になり、 | |
292 | 一部の使用についてはその時から廃止予定警告が出始めています。 | |
293 | これらの場合は Perl 5.26 で致命的エラーになりました。 | |
294 | 見過ごしにより、全てのリテラルな C<{> の使用に対して廃止予定警告を | |
295 | 出していませんでした。 | |
296 | 一部の場合は Perl 5.26 で警告を始め、Perl 5.30 で致命的エラーになりました。 | |
297 | その他の場合は Perl 5.28 で始め、5.32 で致命的エラーになりました。 | |
298 | ||
299 | =head3 In XS code, use of various macros dealing with UTF-8. | |
300 | ||
301 | (XS コードで、UTF-8 を扱う様々なマクロの使用) | |
302 | ||
303 | =begin original | |
304 | ||
305 | The macros below now require an extra parameter than in versions prior | |
306 | to Perl 5.32. The final parameter in each one is a pointer into the | |
307 | string supplied by the first parameter beyond which the input will not | |
308 | be read. This prevents potential reading beyond the end of the buffer. | |
309 | C<isALPHANUMERIC_utf8>, | |
310 | C<isASCII_utf8>, | |
311 | C<isBLANK_utf8>, | |
312 | C<isCNTRL_utf8>, | |
313 | C<isDIGIT_utf8>, | |
314 | C<isIDFIRST_utf8>, | |
315 | C<isPSXSPC_utf8>, | |
316 | C<isSPACE_utf8>, | |
317 | C<isVERTWS_utf8>, | |
318 | C<isWORDCHAR_utf8>, | |
319 | C<isXDIGIT_utf8>, | |
320 | C<isALPHANUMERIC_LC_utf8>, | |
321 | C<isALPHA_LC_utf8>, | |
322 | C<isASCII_LC_utf8>, | |
323 | C<isBLANK_LC_utf8>, | |
324 | C<isCNTRL_LC_utf8>, | |
325 | C<isDIGIT_LC_utf8>, | |
326 | C<isGRAPH_LC_utf8>, | |
327 | C<isIDCONT_LC_utf8>, | |
328 | C<isIDFIRST_LC_utf8>, | |
329 | C<isLOWER_LC_utf8>, | |
330 | C<isPRINT_LC_utf8>, | |
331 | C<isPSXSPC_LC_utf8>, | |
332 | C<isPUNCT_LC_utf8>, | |
333 | C<isSPACE_LC_utf8>, | |
334 | C<isUPPER_LC_utf8>, | |
335 | C<isWORDCHAR_LC_utf8>, | |
336 | C<isXDIGIT_LC_utf8>, | |
337 | C<toFOLD_utf8>, | |
338 | C<toLOWER_utf8>, | |
339 | C<toTITLE_utf8>, | |
340 | and | |
341 | C<toUPPER_utf8>. | |
342 | ||
343 | =end original | |
344 | ||
345 | これらのマクロは Perl 5.32 以前より一つ追加の引数が必要になりました。 | |
346 | それぞれの最後の引数は、これを超えて入力が読み込まれない、最初の引数で | |
347 | 指定された文字列へのポインタです。 | |
348 | これはバッファの末尾を超えて読み込む可能性を防ぎます。 | |
349 | C<isALPHANUMERIC_utf8>, | |
350 | C<isASCII_utf8>, | |
351 | C<isBLANK_utf8>, | |
352 | C<isCNTRL_utf8>, | |
353 | C<isDIGIT_utf8>, | |
354 | C<isIDFIRST_utf8>, | |
355 | C<isPSXSPC_utf8>, | |
356 | C<isSPACE_utf8>, | |
357 | C<isVERTWS_utf8>, | |
358 | C<isWORDCHAR_utf8>, | |
359 | C<isXDIGIT_utf8>, | |
360 | C<isALPHANUMERIC_LC_utf8>, | |
361 | C<isALPHA_LC_utf8>, | |
362 | C<isASCII_LC_utf8>, | |
363 | C<isBLANK_LC_utf8>, | |
364 | C<isCNTRL_LC_utf8>, | |
365 | C<isDIGIT_LC_utf8>, | |
366 | C<isGRAPH_LC_utf8>, | |
367 | C<isIDCONT_LC_utf8>, | |
368 | C<isIDFIRST_LC_utf8>, | |
369 | C<isLOWER_LC_utf8>, | |
370 | C<isPRINT_LC_utf8>, | |
371 | C<isPSXSPC_LC_utf8>, | |
372 | C<isPUNCT_LC_utf8>, | |
373 | C<isSPACE_LC_utf8>, | |
374 | C<isUPPER_LC_utf8>, | |
375 | C<isWORDCHAR_LC_utf8>, | |
376 | C<isXDIGIT_LC_utf8>, | |
377 | C<toFOLD_utf8>, | |
378 | C<toLOWER_utf8>, | |
379 | C<toTITLE_utf8>, | |
380 | C<toUPPER_utf8>. | |
381 | ||
382 | =begin original | |
383 | ||
384 | Since Perl 5.26, this functionality with the extra parameter has been | |
385 | available by using a corresponding macro to each one of these, and whose | |
386 | name is formed by appending C<_safe> to the base name. There is no | |
387 | change to the functionality of those. For example, C<isDIGIT_utf8_safe> | |
388 | corresponds to C<isDIGIT_utf8>, and both now behave identically. All | |
389 | are documented in L<perlapi/Character case changing> and | |
390 | L<perlapi/Character classification>. | |
391 | ||
392 | =end original | |
393 | ||
394 | Perl 5.26 から、追加の引数の機能は、 | |
395 | これらのそれぞれに対応するベース名に C<_safe> を追加した形の名前のマクロを | |
396 | 使うことによって利用可能です。 | |
397 | これらの機能に変更はありません。 | |
398 | 例えば、C<isDIGIT_utf8_safe> は C<isDIGIT_utf8> に対応し、 | |
399 | これらは同様に振る舞うようになりました。 | |
400 | これら全ては L<perlapi/Character case changing> と | |
401 | L<perlapi/Character classification> に文書化されています。 | |
402 | ||
403 | =begin original | |
404 | ||
405 | This change was originally scheduled for 5.30, but was delayed until | |
406 | 5.32. | |
407 | ||
408 | =end original | |
409 | ||
410 | この変更は本来 5.30 に計画されていましたが、5.32 まで延期されました。 | |
411 | ||
412 | =head3 C<< File::Glob::glob() >> was removed | |
413 | ||
414 | (C<< File::Glob::glob() >> は削除されました) | |
415 | ||
416 | =begin original | |
417 | ||
418 | C<< File::Glob >> has a function called C<< glob >>, which just calls | |
419 | C<< bsd_glob >>. | |
420 | ||
421 | =end original | |
422 | ||
423 | C<< File::Glob >> は、単に C<< bsd_glob >> を呼び出す関数 | |
424 | C<< glob >> を持っています。 | |
425 | ||
426 | =begin original | |
427 | ||
428 | C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation | |
429 | message was issued from Perl 5.26 onwards, and the function has now | |
430 | disappeared in Perl 5.30. | |
431 | ||
432 | =end original | |
433 | ||
434 | C<< File::Glob::glob() >> は Perl 5.8 に廃止予定になりました。 | |
435 | 廃止予定メッセージは Perl 5.26 から出力されていて、 | |
436 | この関数は Perl 5.30 で消滅しました。 | |
437 | ||
438 | =begin original | |
439 | ||
440 | Code using C<< File::Glob::glob() >> should call | |
441 | C<< File::Glob::bsd_glob() >> instead. | |
442 | ||
443 | =end original | |
444 | ||
445 | C<< File::Glob::glob() >> を使っているコードは代わりに | |
446 | C<< File::Glob::bsd_glob() >> を呼び出すべきです。 | |
447 | ||
134 | 448 | =head2 Perl 5.30 |
135 | 449 | |
136 | 450 | =head3 C<< $* >> is no longer supported |
137 | 451 | |
138 | 452 | (C<< $* >> はもはや対応しません) |
139 | 453 | |
140 | 454 | =begin original |
141 | 455 | |
142 | 456 | Before Perl 5.10, setting C<< $* >> to a true value globally enabled |
143 | 457 | multi-line matching within a string. This relique from the past lost |
144 | 458 | its special meaning in 5.10. Use of this variable will be a fatal error |
145 | 459 | in Perl 5.30, freeing the variable up for a future special meaning. |
146 | 460 | |
147 | 461 | =end original |
148 | 462 | |
149 | 463 | Perl 5.10 より前では、C<< $* >> に真の値を設定すると、 |
150 | 464 | 一つの文字列中の複数行マッチングをグローバルに有効にします。 |
151 | 465 | この過去からの遺物は 5.10 で特別な意味を失いました。 |
152 | 466 | 将来の特別な意味のために変数を空けるために、 |
153 | 467 | この変数の使用は Perl 5.30 で致命的エラーになります。 |
154 | 468 | |
155 | 469 | =begin original |
156 | 470 | |
157 | 471 | To enable multiline matching one should use the C<< /m >> regexp |
158 | 472 | modifier (possibly in combination with C<< /s >>). This can be set |
159 | 473 | on a per match bases, or can be enabled per lexical scope (including |
160 | 474 | a whole file) with C<< use re '/m' >>. |
161 | 475 | |
162 | 476 | =end original |
163 | 477 | |
164 | 478 | 複数行マッチングを有効にするためには、 |
165 | 479 | (おそらく C<< /s >> と組み合わせて) C<< /m >> 正規表現修飾子を使うべきです。 |
166 | 480 | これはマッチング毎で設定したり、C<< use re '/m' >> で (ファイル全体を含む) |
167 | 481 | レキシカルスコープ毎に設定したり出来ます。 |
168 | 482 | |
169 | 483 | =head3 C<< $# >> is no longer supported |
170 | 484 | |
171 | 485 | (C<< $# >> はもはや対応しません) |
172 | 486 | |
173 | 487 | =begin original |
174 | 488 | |
175 | 489 | This variable used to have a special meaning -- it could be used |
176 | 490 | to control how numbers were formatted when printed. This seldom |
177 | 491 | used functionality was removed in Perl 5.10. In order to free up |
178 | 492 | the variable for a future special meaning, its use will be a fatal |
179 | 493 | error in Perl 5.30. |
180 | 494 | |
181 | 495 | =end original |
182 | 496 | |
183 | 497 | この変数は特別な意味を持っていました -- |
184 | 498 | print したときにいくつフォーマットするかを制御するために使われていました。 |
185 | 499 | このほとんど使われない機能は Perl 5.10 で削除されました。 |
186 | 500 | 将来の特別な意味のために変数を空けるために、 |
187 | 501 | この使用は Perl 5.30 で致命的エラーになります。 |
188 | 502 | |
189 | 503 | =begin original |
190 | 504 | |
191 | To specify how numbers are formatted when printed, one is advi | |
505 | To specify how numbers are formatted when printed, one is advised | |
192 | 506 | to use C<< printf >> or C<< sprintf >> instead. |
193 | 507 | |
194 | 508 | =end original |
195 | 509 | |
196 | 510 | print したときにいくつフォーマットされるかを指定するには、 |
197 | 511 | 代わりに C<< printf >> や C<< sprintf >> を使うことを勧めます。 |
198 | 512 | |
513 | =head3 Assigning non-zero to C<< $[ >> is fatal | |
514 | ||
515 | (C<< $[ >> への非 0 の代入は致命的エラーになります) | |
516 | ||
517 | =begin original | |
518 | ||
519 | This variable (and the corresponding C<array_base> feature and | |
520 | L<arybase> module) allowed changing the base for array and string | |
521 | indexing operations. | |
522 | ||
523 | =end original | |
524 | ||
525 | この変数 (および対応する C<array_base> 機能と L<arybase> モジュール) は | |
526 | 配列と文字列の添え字操作の底を変更することができました。 | |
527 | ||
528 | =begin original | |
529 | ||
530 | Setting this to a non-zero value has been deprecated since Perl 5.12 and | |
531 | throws a fatal error as of Perl 5.30. | |
532 | ||
533 | =end original | |
534 | ||
535 | これに非 0 の値を設定するのは Perl 5.12 から廃止予定になり、 | |
536 | Perl 5.30 から致命的エラーを投げます。 | |
537 | ||
199 | 538 | =head3 C<< File::Glob::glob() >> will disappear |
200 | 539 | |
201 | 540 | (C<< File::Glob::glob() >> は消滅します) |
202 | 541 | |
203 | 542 | =begin original |
204 | 543 | |
205 | 544 | C<< File::Glob >> has a function called C<< glob >>, which just calls |
206 | 545 | C<< bsd_glob >>. However, its prototype is different from the prototype |
207 | 546 | of C<< CORE::glob >>, and hence, C<< File::Glob::glob >> should not |
208 | 547 | be used. |
209 | 548 | |
210 | 549 | =end original |
211 | 550 | |
212 | 551 | C<< File::Glob >> には C<< glob >> という関数があり、 |
213 | 552 | これは単に C<< bsd_glob >> を呼び出します。 |
214 | 553 | しかし、そのプロトタイプは C<< CORE::glob >> と異なっているので、 |
215 | 554 | C<< File::Glob::glob >> は使うべきではありません。 |
216 | 555 | |
217 | 556 | =begin original |
218 | 557 | |
219 | 558 | C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation |
220 | 559 | message was issued from Perl 5.26 onwards, and the function will |
221 | 560 | disappear in Perl 5.30. |
222 | 561 | |
223 | 562 | =end original |
224 | 563 | |
225 | 564 | C<< File::Glob::glob() >> は Perl 5.8 で廃止予定になりました。 |
226 | 565 | 廃止予定メッセージは Perl 5.26 から出力されるようになり、 |
227 | 566 | この関数は Perl 5.30 で消滅します。 |
228 | 567 | |
229 | 568 | =begin original |
230 | 569 | |
231 | 570 | Code using C<< File::Glob::glob() >> should call |
232 | 571 | C<< File::Glob::bsd_glob() >> instead. |
233 | 572 | |
234 | 573 | =end original |
235 | 574 | |
236 | 575 | C<< File::Glob::glob() >> を使っているコードは代わりに |
237 | 576 | C<< File::Glob::bsd_glob() >> を呼び出すべきです。 |
238 | 577 | |
239 | =head3 Unescaped left braces in regular expressions | |
578 | =head3 Unescaped left braces in regular expressions (for 5.30) | |
240 | 579 | |
241 | (正規表現中のエスケープされない左中かっこ) | |
580 | (正規表現中のエスケープされない左中かっこ(5.30 版)) | |
242 | 581 | |
243 | 582 | =begin original |
244 | 583 | |
245 | ||
584 | See L</Unescaped left braces in regular expressions> above. | |
246 | character (U+007B C<LEFT CURLY BRACKET>) in a regular expression | |
247 | pattern, is to escape each literal instance of it in some way. | |
248 | Generally easiest is to precede it with a backslash, like C<\{> | |
249 | or enclose it in square brackets (C<[{]>). If the pattern | |
250 | delimiters are also braces, any matching right brace (C<}>) should | |
251 | also be escaped to avoid confusing the parser, for example, | |
252 | 585 | |
253 | 586 | =end original |
254 | 587 | |
255 | ||
588 | 前述の L</Unescaped left braces in regular expressions> を | |
256 | ||
589 | 参照してください。 | |
257 | 覚えるべき単純な規則は、何らかの形でそれぞれのリテラルな実体を | |
258 | エスケープすることです。 | |
259 | 一般的に最も簡単な方法は、C<\{> のように逆スラッシュを前置するか、 | |
260 | 大かっこで囲む (C<[{]>) ことです。 | |
261 | パターン区切り文字も中かっこなら、例えばパーサの混乱を避けるために、 | |
262 | マッチングする右中かっこ (C<}>) もエスケープするべきです。 | |
263 | 590 | |
264 | qr{abc\{def\}ghi} | |
265 | ||
266 | =begin original | |
267 | ||
268 | Forcing literal C<{> characters to be escaped will enable the Perl | |
269 | language to be extended in various ways in future releases. To avoid | |
270 | needlessly breaking existing code, the restriction is is not enforced in | |
271 | contexts where there are unlikely to ever be extensions that could | |
272 | conflict with the use there of C<{> as a literal. | |
273 | ||
274 | =end original | |
275 | ||
276 | リテラルな C<{> 文字のエスケープの強制は、 | |
277 | Perl 言語が将来のリリースで様々な方法で拡張できるようにするためにします。 | |
278 | 既存のコードを不必要に壊すのを避けるために、この制限は、 | |
279 | C<{> をリテラルとして使うことと衝突する拡張がなさそうな部分では | |
280 | 強制されません。 | |
281 | ||
282 | =begin original | |
283 | ||
284 | Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it | |
285 | started to give deprecation warnings since. These cases were made fatal | |
286 | in Perl 5.26. Due to an oversight, not all cases of a use of a literal | |
287 | C<{> got a deprecation warning. These cases started warning in Perl 5.26, | |
288 | and they will be fatal by Perl 5.30. | |
289 | ||
290 | =end original | |
291 | ||
292 | C<{> のリテラルな使用は Perl 5.20 に廃止予定になり、 | |
293 | 一部の使用についてはその時から廃止予定警告が出始めています。 | |
294 | これらの場合は Perl 5.26 で致命的エラーになりました。 | |
295 | 見過ごしにより、全てのリテラルな C<{> の使用に対して廃止予定警告を | |
296 | 出していませんでした。 | |
297 | これらの場合は Perl 5.26 で警告を始め、Perl 5.30 で致命的エラーになります。 | |
298 | ||
299 | 591 | =head3 Unqualified C<dump()> |
300 | 592 | |
301 | 593 | (修飾されない C<dump()>) |
302 | 594 | |
303 | 595 | =begin original |
304 | 596 | |
305 | 597 | Use of C<dump()> instead of C<CORE::dump()> was deprecated in Perl 5.8, |
306 | 598 | and an unqualified C<dump()> will no longer be available in Perl 5.30. |
307 | 599 | |
308 | 600 | =end original |
309 | 601 | |
310 | 602 | C<CORE::dump()> の代わりの C<dump()> の使用は Perl 5.8 で廃止予定になり、 |
311 | 603 | 修飾されない C<dump()> は Perl 5.30 で利用できなくなります。 |
312 | 604 | |
313 | 605 | =begin original |
314 | 606 | |
315 | 607 | See L<perlfunc/dump>. |
316 | 608 | |
317 | 609 | =end original |
318 | 610 | |
319 | 611 | L<perlfunc/dump> を参照してください。 |
320 | 612 | |
321 | 613 | =head3 Using my() in false conditional. |
322 | 614 | |
323 | 615 | (偽の条件で my() を使う) |
324 | 616 | |
325 | 617 | =begin original |
326 | 618 | |
327 | 619 | There has been a long-standing bug in Perl that causes a lexical variable |
328 | 620 | not to be cleared at scope exit when its declaration includes a false |
329 | 621 | conditional. Some people have exploited this bug to achieve a kind of |
330 | static variable. | |
622 | static variable. To allow us to fix this bug, people should not be | |
331 | 623 | relying on this behavior. |
332 | 624 | |
333 | 625 | =end original |
334 | 626 | |
335 | 627 | Perl には、宣言が偽の条件を含んでいる場合、スコープを出るときに |
336 | 628 | レキシカル変数がクリアされないという長年のバグがあります。 |
337 | 629 | 一部の人々はある種の静的変数を達成するためにこのバグを悪用していました。 |
338 | 私たち | |
630 | 私たちがこのバグを修正できるように、人々はこの振る舞いに | |
339 | 依存し | |
631 | 依存しないべきです。 | |
340 | 632 | |
341 | 633 | =begin original |
342 | 634 | |
343 | 635 | Instead, it's recommended one uses C<state> variables to achieve the |
344 | 636 | same effect: |
345 | 637 | |
346 | 638 | =end original |
347 | 639 | |
348 | 640 | 代わりに、同じ効果を達成するために C<state> 変数を使うことを勧めます: |
349 | 641 | |
350 | 642 | use 5.10.0; |
351 | 643 | sub count {state $counter; return ++ $counter} |
352 | 644 | say count (); # Prints 1 |
353 | 645 | say count (); # Prints 2 |
354 | 646 | |
355 | 647 | =begin original |
356 | 648 | |
357 | 649 | C<state> variables were introduced in Perl 5.10. |
358 | 650 | |
359 | 651 | =end original |
360 | 652 | |
361 | 653 | C<state> 変数は Perl 5.10 で導入されました。 |
362 | 654 | |
363 | 655 | =begin original |
364 | 656 | |
365 | 657 | Alternatively, you can achieve a similar static effect by |
366 | declaring the variable in a separate block outside the function, eg | |
658 | declaring the variable in a separate block outside the function, e.g., | |
367 | 659 | |
368 | 660 | =end original |
369 | 661 | |
370 | 662 | あるいは、関数の外側の別のブロックの中で変数を宣言することで |
371 | 663 | 似たような静的な効果を得られます: |
372 | 664 | |
373 | 665 | sub f { my $x if 0; return $x++ } |
374 | 666 | |
375 | 667 | =begin original |
376 | 668 | |
377 | 669 | becomes |
378 | 670 | |
379 | 671 | =end original |
380 | 672 | |
381 | 673 | これは次のようになります: |
382 | 674 | |
383 | 675 | { my $x; sub f { return $x++ } } |
384 | 676 | |
385 | 677 | =begin original |
386 | 678 | |
387 | 679 | The use of C<my()> in a false conditional has been deprecated in |
388 | Perl 5.10, and | |
680 | Perl 5.10, and became a fatal error in Perl 5.30. | |
389 | 681 | |
390 | 682 | =end original |
391 | 683 | |
392 | 684 | 偽の条件での C<my()> の使用は Perl 5.10 で廃止予定になり、 |
393 | Perl 5.30 で致命的エラーになりま | |
685 | Perl 5.30 で致命的エラーになりました。 | |
394 | 686 | |
395 | 687 | =head3 Reading/writing bytes from/to :utf8 handles. |
396 | 688 | |
397 | 689 | (:utf8 ハンドルに対するバイト読み書き) |
398 | 690 | |
399 | 691 | =begin original |
400 | 692 | |
401 | 693 | The sysread(), recv(), syswrite() and send() operators are |
402 | 694 | deprecated on handles that have the C<:utf8> layer, either explicitly, or |
403 | 695 | implicitly, eg., with the C<:encoding(UTF-16LE)> layer. |
404 | 696 | |
405 | 697 | =end original |
406 | 698 | |
407 | 699 | (明示的あるいは C<:encoding(UTF-16LE)> 層のように暗黙的どちらでも) |
408 | 700 | C<:utf8> 層を持つハンドルに対する |
409 | 701 | sysread(), recv(), syswrite(), send() 演算子は廃止予定です。 |
410 | 702 | |
411 | 703 | =begin original |
412 | 704 | |
413 | 705 | Both sysread() and recv() currently use only the C<:utf8> flag for the stream, |
414 | 706 | ignoring the actual layers. Since sysread() and recv() do no UTF-8 |
415 | 707 | validation they can end up creating invalidly encoded scalars. |
416 | 708 | |
417 | 709 | =end original |
418 | 710 | |
419 | 711 | sysread() と recv() の両方は今のところ C<:utf8> フラグを |
420 | 712 | ストリームのためだけに使い、実際の層は無視します。 |
421 | 713 | sysread() と recv() は UTF-8 検証を行わないので、 |
422 | 714 | 不正にエンコードされたスカラを作ることになるかも知れません。 |
423 | 715 | |
424 | 716 | =begin original |
425 | 717 | |
426 | 718 | Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise ignoring |
427 | 719 | any layers. If the flag is set, both write the value UTF-8 encoded, even if |
428 | 720 | the layer is some different encoding, such as the example above. |
429 | 721 | |
430 | 722 | =end original |
431 | 723 | |
432 | 724 | 同様に、syswrite() と send() は C<:utf8> フラグのみを使い、 |
433 | 725 | その他の層は無視します。 |
434 | 726 | フラグが設定されていると、これらは、たとえ層が前述の例のように |
435 | 727 | 異なったエンコーディングの場合でも、UTF-8 エンコードされた値を書き込みます。 |
436 | 728 | |
437 | 729 | =begin original |
438 | 730 | |
439 | 731 | Ideally, all of these operators would completely ignore the C<:utf8> state, |
440 | 732 | working only with bytes, but this would result in silently breaking existing |
441 | 733 | code. To avoid this a future version of perl will throw an exception when |
442 | 734 | any of sysread(), recv(), syswrite() or send() are called on handle with the |
443 | 735 | C<:utf8> layer. |
444 | 736 | |
445 | 737 | =end original |
446 | 738 | |
447 | 739 | 理想的には、これらの演算子全ては完全に C<:utf8> の状態を無視して、 |
448 | 740 | バイトに対してのみ動作したいですが、 |
449 | 741 | これは既存のコードを暗黙に壊すことになります。 |
450 | 742 | これを避けるために、将来のバージョンの Perl では |
451 | 743 | sysread(), recv(), syswrite(), send() が C<:utf8> 層を持った |
452 | 744 | ハンドルで呼び出されると例外を投げる予定です。 |
453 | 745 | |
454 | 746 | =begin original |
455 | 747 | |
456 | 748 | In Perl 5.30, it will no longer be possible to use sysread(), recv(), |
457 | 749 | syswrite() or send() to read or send bytes from/to :utf8 handles. |
458 | 750 | |
459 | 751 | =end original |
460 | 752 | |
461 | 753 | Perl 5.30 で、:utf8 ハンドルでバイトを読み書きするために |
462 | 754 | sysread(), recv(), syswrite(), send() を使うことはできなくなります。 |
463 | 755 | |
464 | 756 | =head3 Use of unassigned code point or non-standalone grapheme for a delimiter. |
465 | 757 | |
466 | 758 | (区切り文字として未割当符号位置や非独立書記素の使用) |
467 | 759 | |
468 | 760 | =begin original |
469 | 761 | |
470 | 762 | A grapheme is what appears to a native-speaker of a language to be a |
471 | 763 | character. In Unicode (and hence Perl) a grapheme may actually be |
472 | 764 | several adjacent characters that together form a complete grapheme. For |
473 | 765 | example, there can be a base character, like "R" and an accent, like a |
474 | circumflex "^", that appear | |
766 | circumflex "^", that appear to be a single character when displayed, | |
475 | the circumflex hovering over the "R". | |
767 | with the circumflex hovering over the "R". | |
476 | that circumflex to be delimiters of strings, patterns, I<etc>. When | |
477 | displayed, the circumflex would look like it belongs to the character | |
478 | just to the left of it. In order to move the language to be able to | |
479 | accept graphemes as delimiters, we have to deprecate the use of | |
480 | delimiters which aren't graphemes by themselves. Also, a delimiter must | |
481 | already be assigned (or known to be never going to be assigned) to try | |
482 | to future-proof code, for otherwise code that works today would fail to | |
483 | compile if the currently unassigned delimiter ends up being something | |
484 | that isn't a stand-alone grapheme. Because Unicode is never going to | |
485 | assign | |
486 | L<non-character code points|perlunicode/Noncharacter code points>, nor | |
487 | L<code points that are above the legal Unicode maximum| | |
488 | perlunicode/Beyond Unicode code points>, those can be delimiters, and | |
489 | their use won't raise this warning. | |
490 | 768 | |
491 | 769 | =end original |
492 | 770 | |
493 | 771 | 書記素は、言語のネイティブスピーカーにとって文字のように見えるものです。 |
494 | 772 | Unicode (従って Perl) では、 |
495 | 773 | 書記素は実際には互いに完全な書記素を形成するいくつかの隣接する |
496 | 774 | 文字かもしれません。 |
497 | 775 | 例えば、"R" のような基底文字と曲折アクセント "^" のような |
498 | 776 | アクセントかもしれません; これは表示されるときには |
499 | 777 | "R" の上に曲折アクセントがある単一の文字となります。 |
500 | Perl は現在の所曲折アクセントのようなものを文字列、パターンなどの | |
501 | 区切り文字にすることを許しています。 | |
502 | 表示されるとき、曲折アクセントは、 | |
503 | そのすぐ左にある文字に付属するかのように見えます。 | |
504 | 言語が書記素を区切り文字として受けいられられるようにするために、 | |
505 | それ自体が書記素でない区切り文字の使用を廃止予定にする必要があります。 | |
506 | また、区切り文字は将来も動作するコードであり続けるために、 | |
507 | 既に割り当てられている(または決して割り当てられないと分かっている) | |
508 | ものでなければなりません; | |
509 | さもなければ、もし現在割り当てられていない書記素が単体の書記素でないものに | |
510 | なった場合、今日動作しているコードがコンパイルに失敗することになります。 | |
511 | Unicode は決して | |
512 | L<非文字符号位置|perlunicode/Noncharacter code points> や | |
513 | L<正当な Unicode の最大値より大きな符号位置| | |
514 | perlunicode/Beyond Unicode code points> を割り当てないので、 | |
515 | これらは区切り文字になることができ、これらの使用は警告を発生させません。 | |
516 | 778 | |
517 | 779 | =begin original |
518 | 780 | |
519 | ||
781 | As of Perl 5.30, use of delimiters which are non-standalone graphemes is | |
520 | a | |
782 | fatal, in order to move the language to be able to accept | |
783 | multi-character graphemes as delimiters. | |
521 | 784 | |
522 | 785 | =end original |
523 | 786 | |
524 | Perl 5.30 | |
787 | Perl 5.30 から、非独立書記素の区切り文字としての使用は致命的エラーです; | |
525 | ||
788 | これは複数文字書記素を区切り文字として受け入れられるように言語を | |
789 | 動かすためです。 | |
526 | 790 | |
527 | =head3 In XS code, use of various macros dealing with UTF-8. | |
528 | ||
529 | (XS コードで、UTF-8 を扱う様々なマクロの使用) | |
530 | ||
531 | 791 | =begin original |
532 | 792 | |
533 | ||
793 | Also, as of Perl 5.30, delimiters which are unassigned code points | |
534 | ||
794 | but that may someday become assigned are prohibited. Otherwise, code | |
535 | ||
795 | that works today would fail to compile if the currently unassigned | |
536 | ||
796 | delimiter ends up being something that isn't a stand-alone grapheme. | |
537 | ||
797 | Because Unicode is never going to assign L<non-character code | |
538 | ||
798 | points|perlunicode/Noncharacter code points>, nor L<code points that are | |
539 | ||
799 | above the legal Unicode maximum|perlunicode/Beyond Unicode code | |
540 | ||
800 | points>, those can be delimiters. | |
541 | C<isSPACE_utf8>, | |
542 | C<isVERTWS_utf8>, | |
543 | C<isWORDCHAR_utf8>, | |
544 | C<isXDIGIT_utf8>, | |
545 | C<isALPHANUMERIC_LC_utf8>, | |
546 | C<isALPHA_LC_utf8>, | |
547 | C<isASCII_LC_utf8>, | |
548 | C<isBLANK_LC_utf8>, | |
549 | C<isCNTRL_LC_utf8>, | |
550 | C<isDIGIT_LC_utf8>, | |
551 | C<isGRAPH_LC_utf8>, | |
552 | C<isIDCONT_LC_utf8>, | |
553 | C<isIDFIRST_LC_utf8>, | |
554 | C<isLOWER_LC_utf8>, | |
555 | C<isPRINT_LC_utf8>, | |
556 | C<isPSXSPC_LC_utf8>, | |
557 | C<isPUNCT_LC_utf8>, | |
558 | C<isSPACE_LC_utf8>, | |
559 | C<isUPPER_LC_utf8>, | |
560 | C<isWORDCHAR_LC_utf8>, | |
561 | C<isXDIGIT_LC_utf8>, | |
562 | C<toFOLD_utf8>, | |
563 | C<toLOWER_utf8>, | |
564 | C<toTITLE_utf8>, | |
565 | and | |
566 | C<toUPPER_utf8>. | |
567 | 801 | |
568 | 802 | =end original |
569 | 803 | |
570 | ||
804 | また、Perl 5.30 から、いつか割り当てられるかも知れない | |
571 | ||
805 | 非割り当て符号位置の区切り文字も禁止されます。 | |
572 | ||
806 | さもなければ、もし現在割り当てられていない書記素が単体の書記素でないものに | |
573 | ||
807 | なった場合、今日動作しているコードがコンパイルに失敗することになります。 | |
574 | ||
808 | Unicode は決して | |
575 | ||
809 | L<非文字符号位置|perlunicode/Noncharacter code points> や | |
576 | ||
810 | L<正当な Unicode の最大値より大きな符号位置| | |
577 | ||
811 | perlunicode/Beyond Unicode code points> を割り当てないので、 | |
578 | ||
812 | これらは区切り文字になることができます。 | |
579 | C<isVERTWS_utf8>, | |
580 | C<isWORDCHAR_utf8>, | |
581 | C<isXDIGIT_utf8>, | |
582 | C<isALPHANUMERIC_LC_utf8>, | |
583 | C<isALPHA_LC_utf8>, | |
584 | C<isASCII_LC_utf8>, | |
585 | C<isBLANK_LC_utf8>, | |
586 | C<isCNTRL_LC_utf8>, | |
587 | C<isDIGIT_LC_utf8>, | |
588 | C<isGRAPH_LC_utf8>, | |
589 | C<isIDCONT_LC_utf8>, | |
590 | C<isIDFIRST_LC_utf8>, | |
591 | C<isLOWER_LC_utf8>, | |
592 | C<isPRINT_LC_utf8>, | |
593 | C<isPSXSPC_LC_utf8>, | |
594 | C<isPUNCT_LC_utf8>, | |
595 | C<isSPACE_LC_utf8>, | |
596 | C<isUPPER_LC_utf8>, | |
597 | C<isWORDCHAR_LC_utf8>, | |
598 | C<isXDIGIT_LC_utf8>, | |
599 | C<toFOLD_utf8>, | |
600 | C<toLOWER_utf8>, | |
601 | C<toTITLE_utf8>, | |
602 | C<toUPPER_utf8>. | |
603 | 813 | |
604 | =begin original | |
605 | ||
606 | There is now a macro that corresponds to each one of these, simply by | |
607 | appending C<_safe> to the name. It takes the extra parameter. | |
608 | For example, C<isDIGIT_utf8_safe> corresponds to C<isDIGIT_utf8>, but | |
609 | takes the extra parameter, and its use doesn't generate a deprecation | |
610 | warning. All are documented in L<perlapi/Character case changing> and | |
611 | L<perlapi/Character classification>. | |
612 | ||
613 | =end original | |
614 | ||
615 | これらのそれぞれに対応する、単に名前に C<_safe> を追加したマクロがあります。 | |
616 | これは追加の引数を取ります。 | |
617 | 例えば、C<isDIGIT_utf8_safe> は C<isDIGIT_utf8> に対応しますが、 | |
618 | これは追加の引数を取り、これを使っても廃止予定警告は生成されません。 | |
619 | これら全ては L<perlapi/Character case changing> と | |
620 | L<perlapi/Character classification> に文書化されています。 | |
621 | ||
622 | =begin original | |
623 | ||
624 | You can change to use these versions at any time, or, if you can live | |
625 | with the deprecation messages, wait until 5.30 and add the parameter to | |
626 | the existing calls, without changing the names. | |
627 | ||
628 | =end original | |
629 | ||
630 | これらのバージョンをすぐに使うこともできますし、 | |
631 | 廃止予定メッセージと共に生きることができるなら、 | |
632 | 5.30 まで待って、名前を変更することなく既存の呼び出しに引数を | |
633 | 追加することもできます。 | |
634 | ||
635 | 814 | =head2 Perl 5.28 |
636 | 815 | |
637 | =head3 Attribute | |
816 | =head3 Attributes C<< :locked >> and C<< :unique >> | |
638 | 817 | |
639 | (属性 | |
818 | (属性 C<< :locked >> と C<< :unique >>) | |
640 | 819 | |
641 | 820 | =begin original |
642 | 821 | |
643 | 822 | The attributes C<< :locked >> (on code references) and C<< :unique >> |
644 | 823 | (on array, hash and scalar references) have had no effect since |
645 | 824 | Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated |
646 | 825 | since. |
647 | 826 | |
648 | 827 | =end original |
649 | 828 | |
650 | 829 | 属性 (コードリファレンスに対する) C<< :locked >> および |
651 | 830 | (配列、ハッシュ、スカラリファレンスに対する) C<< :unique >> は |
652 | 831 | それぞれ Perl Perl 5.005 と Perl 5.8.8 から何もしなくなっていました。 |
653 | 832 | これらの使用はその時から廃止予定でした。 |
654 | 833 | |
655 | 834 | =begin original |
656 | 835 | |
657 | ||
836 | As of Perl 5.28, these attributes are syntax errors. Since the | |
658 | ||
837 | attributes do not do anything, removing them from your code fixes | |
659 | removing them | |
838 | the syntax error; and removing them will not influence the behaviour | |
660 | ||
839 | of your code. | |
661 | 840 | |
662 | 841 | =end original |
663 | 842 | |
664 | ||
843 | Perl 5.28 から、これらの属性は文法エラーとなります。 | |
665 | 844 | これらの属性は何もしないので、コードからこれらを削除すれば |
666 | ||
845 | 文法エラーを修正でき、削除することによってコードの振る舞いには | |
667 | 846 | 影響ありません。 |
668 | 847 | |
669 | 848 | =head3 Bare here-document terminators |
670 | 849 | |
671 | 850 | (空のヒヤドキュメント終端子) |
672 | 851 | |
673 | 852 | =begin original |
674 | 853 | |
675 | 854 | Perl has allowed you to use a bare here-document terminator to have the |
676 | 855 | here-document end at the first empty line. This practise was deprecated |
677 | in Perl 5.000 | |
856 | in Perl 5.000; as of Perl 5.28, using a bare here-document terminator | |
857 | throws a fatal error. | |
678 | 858 | |
679 | 859 | =end original |
680 | 860 | |
681 | 861 | Perl は、最初の空行をヒヤドキュメントの末尾とするために空の |
682 | 862 | ヒヤドキュメント終端子を使うことを許していました。 |
683 | この監修は Perl 5.000 で廃止予定になり | |
863 | この監修は Perl 5.000 で廃止予定になりました; | |
684 | ||
864 | Perl 5.28 から、裸のヒヤドキュメント終端子の使用は | |
865 | 致命的エラーを投げます。 | |
685 | 866 | |
686 | 867 | =begin original |
687 | 868 | |
688 | You are encouraged to use the explictly quoted form if you wish to | |
869 | You are encouraged to use the explicitly quoted form if you wish to | |
689 | 870 | use an empty line as the terminator of the here-document: |
690 | 871 | |
691 | 872 | =end original |
692 | 873 | |
693 | 874 | ヒヤドキュメントの終端子として空行を使いたい場合は、 |
694 | 875 | 明示的にクォートした形式を使うことが推奨されます: |
695 | 876 | |
696 | 877 | print <<""; |
697 | 878 | Print this line. |
698 | 879 | |
699 | 880 | # Previous blank line ends the here-document. |
700 | 881 | |
701 | 882 | =head3 Setting $/ to a reference to a non-positive integer |
702 | 883 | |
703 | 884 | ($/ に非正整数へのリファレンスを設定) |
704 | 885 | |
705 | 886 | =begin original |
706 | 887 | |
707 | 888 | You assigned a reference to a scalar to C<$/> where the |
708 | 889 | referenced item is not a positive integer. In older perls this B<appeared> |
709 | 890 | to work the same as setting it to C<undef> but was in fact internally |
710 | 891 | different, less efficient and with very bad luck could have resulted in |
711 | 892 | your file being split by a stringified form of the reference. |
712 | 893 | |
713 | 894 | =end original |
714 | 895 | |
715 | 896 | リファレンスが差しているのが非正整数のときにそのリファレンスを |
716 | 897 | C<$/> に代入しました。 |
717 | 898 | より古い Perl では、これは C<undef> を設定するのと同じ |
718 | 899 | B<ように見えます> が、実際内部では異なり、 |
719 | 900 | より効率が悪く、とても運が悪いとファイルがリファレンスの文字列化形式で |
720 | 901 | 分割されることになります。 |
721 | 902 | |
722 | 903 | =begin original |
723 | 904 | |
724 | 905 | In Perl 5.20.0 this was changed so that it would be B<exactly> the same as |
725 | 906 | setting C<$/> to undef, with the exception that this warning would be |
726 | 907 | thrown. |
727 | 908 | |
728 | 909 | =end original |
729 | 910 | |
730 | 911 | Perl 5.20.0 では、これは例外が投げられることを除けば、 |
731 | 912 | B<正確に> C<$/> に undef を設定するのと同じです。 |
732 | 913 | |
733 | 914 | =begin original |
734 | 915 | |
735 | ||
916 | As of Perl 5.28, setting C<$/> to a reference of a non-positive | |
917 | integer throws a fatal error. | |
736 | 918 | |
737 | 919 | =end original |
738 | 920 | |
739 | Perl 5.28 | |
921 | Perl 5.28 から、C<$/> に非正整数へのリファレンスを設定すると | |
922 | 致命的エラーを投げます。 | |
740 | 923 | |
741 | 924 | =begin original |
742 | 925 | |
743 | 926 | You are recommended to change your code to set C<$/> to C<undef> explicitly |
744 | 927 | if you wish to slurp the file. |
745 | 928 | |
746 | 929 | =end original |
747 | 930 | |
748 | 931 | ファイルを吸い込みたい場合、明示的に C<$/> に C<undef> を設定するように |
749 | 932 | コードを変更することを薦めます。 |
750 | 933 | |
751 | 934 | =head3 Limit on the value of Unicode code points. |
752 | 935 | |
753 | 936 | (Unicode 符号位置の値の制限) |
754 | 937 | |
755 | 938 | =begin original |
756 | 939 | |
757 | Unicode only allows code points up to 0x10FFFF, but Perl allows | |
940 | Unicode only allows code points up to 0x10FFFF, but Perl allows | |
758 | larger ones. | |
941 | much larger ones. Up till Perl 5.28, it was allowed to use code | |
759 | of an integer (C<IV_MAX>) | |
942 | points exceeding the maximum value of an integer (C<IV_MAX>). | |
760 | ||
943 | However, that did break the perl interpreter in some constructs, | |
761 | ||
944 | including causing it to hang in a few cases. The known problem | |
762 | as | |
945 | areas were in C<tr///>, regular expression pattern matching using | |
763 | ||
946 | quantifiers, as quote delimiters in C<qI<X>...I<X>> (where I<X> is | |
947 | the C<chr()> of a large code point), and as the upper limits in | |
948 | loops. | |
764 | 949 | |
765 | 950 | =end original |
766 | 951 | |
767 | 952 | Unicode は 0x10FFFF までの符号位置だけを許していますが、 |
768 | 953 | Perl はもっと大きなものも許しています。 |
769 | ||
954 | Perl 5.28 まで、整数の最大値 (C<IV_MAX>) を超える符号位置を許していました。 | |
770 | perl インタプリタを壊すことがあり、 | |
955 | しかし、これは一部の構文でperl インタプリタを壊すことがあり、 | |
956 | 一部の場合はハングアップを引き起こします。 | |
771 | 957 | 問題があることが知られている分野は |
772 | 958 | C<tr///>、量指定子を使った正規表現パターンマッチング |
773 | 959 | C<qI<X>...I<X>> の中でのクォート区切り文字 |
774 | (I<X> は大きな符号位置の C<chr()>)、ループの上限で | |
960 | (I<X> は大きな符号位置の C<chr()>)、ループの上限でした。 | |
775 | 961 | |
776 | 962 | =begin original |
777 | 963 | |
778 | The use of out of range code points was deprecated in Perl 5.24 | |
964 | The use of out of range code points was deprecated in Perl 5.24; as of | |
779 | i | |
965 | Perl 5.28 using a code point exceeding C<IV_MAX> throws a fatal error. | |
780 | 966 | |
781 | 967 | =end original |
782 | 968 | |
783 | 範囲外の符号位置の使用は Perl 5.24 で廃止予定になり | |
969 | 範囲外の符号位置の使用は Perl 5.24 で廃止予定になりました; | |
784 | Perl 5.28 | |
970 | Perl 5.28 から、C<IV_MAX> を超える符号位置の使用は致命的エラーを投げます。 | |
785 | 971 | |
786 | 972 | =begin original |
787 | 973 | |
788 | 974 | If your code is to run on various platforms, keep in mind that the upper |
789 | limit depends on the platform. | |
975 | limit depends on the platform. It is much larger on 64-bit word sizes | |
790 | than 32-bit ones. | |
976 | than 32-bit ones. For 32-bit integers, C<IV_MAX> equals C<0x7FFFFFFF>, | |
977 | for 64-bit integers, C<IV_MAX> equals C<0x7FFFFFFFFFFFFFFF>. | |
791 | 978 | |
792 | 979 | =end original |
793 | 980 | |
794 | 981 | あなたのコードを様々なプラットフォームで実行するためには、 |
795 | 982 | 上限はプラットフォームに依存することを覚えておいてください。 |
796 | 983 | これは 64 ビットワードサイズでは 32 ビットのものより遙かに大きいです。 |
984 | 32 ビット整数では C<IV_MAX> は C<0x7FFFFFFF> で、 | |
985 | 64 ビット整数では C<IV_MAX> は C<0x7FFFFFFFFFFFFFFF> です。 | |
797 | 986 | |
798 | 987 | =head3 Use of comma-less variable list in formats. |
799 | 988 | |
800 | 989 | (フォーマットでのカンマなしの変数リストの使用) |
801 | 990 | |
802 | 991 | =begin original |
803 | 992 | |
804 | It | |
993 | It was allowed to use a list of variables in a format, without | |
805 | 994 | separating them with commas. This usage has been deprecated |
806 | for a long time, and | |
995 | for a long time, and as of Perl 5.28, this throws a fatal error. | |
807 | 996 | |
808 | 997 | =end original |
809 | 998 | |
810 | 999 | フォーマットで、分割するカンマなしの変数のリストを使うことが |
811 | 1000 | 許されていました。 |
812 | この使用法は長い間廃止予定で、Perl 5.28 | |
1001 | この使用法は長い間廃止予定で、Perl 5.28 からこれは致命的エラーを投げます。 | |
813 | 1002 | |
814 | 1003 | =head3 Use of C<\N{}> |
815 | 1004 | |
816 | 1005 | (C<\N{}> の使用) |
817 | 1006 | |
818 | 1007 | =begin original |
819 | 1008 | |
820 | 1009 | Use of C<\N{}> with nothing between the braces was deprecated in |
821 | Perl 5.24, and | |
1010 | Perl 5.24, and throws a fatal error as of Perl 5.28. | |
822 | 1011 | |
823 | 1012 | =end original |
824 | 1013 | |
825 | 1014 | 中かっこの中に何もない C<\N{}> の使用は Perl 5.24 で廃止予定になり、 |
826 | Perl 5.28 | |
1015 | Perl 5.28 から致命的エラーを投げます。 | |
827 | 1016 | |
828 | 1017 | =begin original |
829 | 1018 | |
830 | 1019 | Since such a construct is equivalent to using an empty string, |
831 | 1020 | you are recommended to remove such C<\N{}> constructs. |
832 | 1021 | |
833 | 1022 | =end original |
834 | 1023 | |
835 | 1024 | このような構文は空文字列を使うのと等価なので、 |
836 | 1025 | このような C<\N{}> 構文を削除することを勧めます。 |
837 | 1026 | |
838 | 1027 | =head3 Using the same symbol to open a filehandle and a dirhandle |
839 | 1028 | |
840 | 1029 | (ファイルハンドルとディレクトリハンドルで同じシンボルを使う) |
841 | 1030 | |
842 | 1031 | =begin original |
843 | 1032 | |
844 | 1033 | It used to be legal to use C<open()> to associate both a |
845 | 1034 | filehandle and a dirhandle to the same symbol (glob or scalar). |
846 | 1035 | This idiom is likely to be confusing, and it was deprecated in |
847 | 1036 | Perl 5.10. |
848 | 1037 | |
849 | 1038 | =end original |
850 | 1039 | |
851 | 1040 | ファイルハンドルとディレクトリハンドルに同じシンボル |
852 | 1041 | (グロブまたはスカラ) を代入するのに C<open()> を使うのは、 |
853 | 1042 | 以前は正当でした。 |
854 | 1043 | この慣用句は混乱を起こしやすく、Perl 5.10 で廃止予定になりました。 |
855 | 1044 | |
856 | 1045 | =begin original |
857 | 1046 | |
858 | 1047 | Using the same symbol to C<open()> a filehandle and a dirhandle |
859 | w | |
1048 | throws a fatal error as of Perl 5.28. | |
860 | 1049 | |
861 | 1050 | =end original |
862 | 1051 | |
863 | 1052 | ファイルハンドルとディレクトリハンドルを C<open()> するのに |
864 | 同じシンボルを使うのは Perl 5.28 | |
1053 | 同じシンボルを使うのは Perl 5.28 から致命的エラーを投げます。 | |
865 | 1054 | |
866 | 1055 | =begin original |
867 | 1056 | |
868 | 1057 | You should be using two different symbols instead. |
869 | 1058 | |
870 | 1059 | =end original |
871 | 1060 | |
872 | 1061 | 代わりに二つの異なったシンボルを使うようにしてください。 |
873 | 1062 | |
874 | 1063 | =head3 ${^ENCODING} is no longer supported. |
875 | 1064 | |
876 | 1065 | (${^ENCODING} はもはや対応しません) |
877 | 1066 | |
878 | 1067 | =begin original |
879 | 1068 | |
880 | 1069 | The special variable C<${^ENCODING}> was used to implement |
881 | 1070 | the C<encoding> pragma. Setting this variable to anything other |
882 | 1071 | than C<undef> was deprecated in Perl 5.22. Full deprecation |
883 | 1072 | of the variable happened in Perl 5.25.3. |
884 | 1073 | |
885 | 1074 | =end original |
886 | 1075 | |
887 | 1076 | 特殊変数 C<${^ENCODING}> は C<encoding> プラグマを実装するために |
888 | 1077 | 使われていました。 |
889 | 1078 | この変数を C<undef> 以外の値に設定するのは Perl 5.22 で廃止予定になりました。 |
890 | 1079 | この変数の完全な廃止予定は Perl 5.25.3 で起こりました。 |
891 | 1080 | |
892 | 1081 | =begin original |
893 | 1082 | |
894 | Setting this variable | |
1083 | Setting this variable to anything other than an undefined value | |
1084 | throws a fatal error as of Perl 5.28. | |
895 | 1085 | |
896 | 1086 | =end original |
897 | 1087 | |
898 | この変数の設定 | |
1088 | この変数に未定義値以外のものを設定するのは | |
1089 | Perl 5.28 から致命的エラーを投げます。 | |
899 | 1090 | |
900 | 1091 | =head3 C<< B::OP::terse >> |
901 | 1092 | |
902 | 1093 | =begin original |
903 | 1094 | |
904 | 1095 | This method, which just calls C<< B::Concise::b_terse >>, has been |
905 | deprecated, and | |
1096 | deprecated, and disappeared in Perl 5.28. Please use | |
906 | 1097 | C<< B::Concise >> instead. |
907 | 1098 | |
908 | 1099 | =end original |
909 | 1100 | |
910 | 1101 | 単に C<< B::Concise::b_terse >> を呼び出すこのメソッドは廃止予定で、 |
911 | Perl 5.28 | |
1102 | Perl 5.28 で消滅しました。 | |
912 | 1103 | 代わりに C<< B::Concise >> を使ってください。 |
913 | 1104 | |
914 | =head3 Use of inherited AUTOLOAD for non-method %s() is | |
1105 | =head3 Use of inherited AUTOLOAD for non-method %s::%s() is no longer allowed | |
915 | 1106 | |
916 | (非メソッド %s() のための継承された AUTOLOAD は | |
1107 | (非メソッド %s() のための継承された AUTOLOAD はもはや許されません) | |
917 | 1108 | |
918 | 1109 | =begin original |
919 | 1110 | |
920 | As an (ahem) accidental feature, C<AUTOLOAD> subroutines | |
1111 | As an (ahem) accidental feature, C<AUTOLOAD> subroutines were looked | |
921 | 1112 | up as methods (using the C<@ISA> hierarchy) even when the subroutines |
922 | 1113 | to be autoloaded were called as plain functions (e.g. C<Foo::bar()>), |
923 | 1114 | not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>). |
924 | 1115 | |
925 | 1116 | =end original |
926 | 1117 | |
927 | 1118 | ある (ゴホン) 偶発的な機能として、C<AUTOLOAD> サブルーチンは、 |
928 | 1119 | たとえ autoload されるサブルーチンが |
929 | 1120 | (C<< Foo->bar() >> や C<< $obj->bar() >> のように)メソッドとしてではなく |
930 | 1121 | (C<Foo::bar()> のように)普通の関数として呼び出されても、 |
931 | (C<@ISA> 階層を使って) メソッドして検索されま | |
1122 | (C<@ISA> 階層を使って) メソッドして検索されていました。 | |
932 | 1123 | |
933 | 1124 | =begin original |
934 | 1125 | |
935 | This bug w | |
1126 | This bug was deprecated in Perl 5.004, has been rectified in Perl 5.28 | |
936 | methods' C<AUTOLOAD>s. | |
1127 | by using method lookup only for methods' C<AUTOLOAD>s. | |
937 | 1128 | |
938 | 1129 | =end original |
939 | 1130 | |
940 | このバグは | |
1131 | このバグは Perl 5.004 で廃止予定になり、 | |
941 | ||
1132 | Perl 5.28 でメソッドの C<AUTOLOAD> のみでメソッド検索するように | |
1133 | 修正されました。 | |
942 | 1134 | |
943 | 1135 | =begin original |
944 | 1136 | |
945 | 1137 | The simple rule is: Inheritance will not work when autoloading |
946 | 1138 | non-methods. The simple fix for old code is: In any module that used |
947 | 1139 | to depend on inheriting C<AUTOLOAD> for non-methods from a base class |
948 | 1140 | named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during |
949 | 1141 | startup. |
950 | 1142 | |
951 | 1143 | =end original |
952 | 1144 | |
953 | 1145 | 単純な規則は: 継承は非メソッドを autoload された時には動作しません。 |
954 | 1146 | 古いコードのための簡単な修正方法は: |
955 | 1147 | C<BaseClass> という名前のベースクラスから非メソッドの |
956 | 1148 | C<AUTOLOAD> を継承することに依存しているそれぞれのモジュールで、 |
957 | 1149 | 起動時に C<*AUTOLOAD = \&BaseClass::AUTOLOAD> を実行します。 |
958 | 1150 | |
959 | 1151 | =begin original |
960 | 1152 | |
961 | 1153 | In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);> |
962 | 1154 | you should remove AutoLoader from @ISA and change C<use AutoLoader;> to |
963 | 1155 | C<use AutoLoader 'AUTOLOAD';>. |
964 | 1156 | |
965 | 1157 | =end original |
966 | 1158 | |
967 | 1159 | 現在 C<use AutoLoader; @ISA = qw(AutoLoader);> としているコードは、 |
968 | 1160 | @ISA から AutoLoader を削除して、 |
969 | 1161 | C<use AutoLoader;> を C<use AutoLoader 'AUTOLOAD';> に変更するべきです。 |
970 | 1162 | |
971 | =begin original | |
972 | ||
973 | This feature was deprecated in Perl 5.004, and will be fatal in Perl 5.28. | |
974 | ||
975 | =end original | |
976 | ||
977 | この機能は Perl 5.004 で廃止予定になり、Perl 5.28 で致命的エラーになる | |
978 | 予定です。 | |
979 | ||
980 | 1163 | =head3 Use of code points over 0xFF in string bitwise operators |
981 | 1164 | |
982 | 1165 | (0xFF を超える符号位置に対する文字列ビット単位演算子の使用) |
983 | 1166 | |
984 | 1167 | =begin original |
985 | 1168 | |
986 | 1169 | The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat |
987 | 1170 | their operands as strings of bytes. As such, values above 0xFF |
988 | 1171 | are nonsensical. Using such code points with these operators |
989 | was deprecated in Perl 5.24, and | |
1172 | was deprecated in Perl 5.24, and is fatal as of Perl 5.28. | |
990 | 1173 | |
991 | 1174 | =end original |
992 | 1175 | |
993 | 1176 | 文字列ビット単位演算子 C<&>, C<|>, C<^>, C<~> は |
994 | 1177 | そのオペランドをバイト文字列として扱います。 |
995 | 1178 | 従って、0xFF を超える値は意味がありません。 |
996 | 1179 | これらの演算子を使ったこのような符号位置の使用は |
997 | Perl 5.24 で廃止予定 | |
1180 | Perl 5.24 で廃止予定になり、Perl 5.28 で致命的エラーになりました。 | |
998 | 1181 | |
999 | 1182 | =head3 In XS code, use of C<to_utf8_case()> |
1000 | 1183 | |
1001 | 1184 | (XS コード内での C<to_utf8_case()> の使用) |
1002 | 1185 | |
1003 | 1186 | =begin original |
1004 | 1187 | |
1005 | This function | |
1188 | This function has been removed as of Perl 5.28; instead convert to call | |
1006 | 1189 | the appropriate one of: |
1007 | 1190 | L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>. |
1008 | 1191 | L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>, |
1009 | 1192 | L<C<toTITLE_utf8_safe>|perlapi/toTITLE_utf8_safe>, |
1010 | 1193 | or |
1011 | 1194 | L<C<toUPPER_utf8_safe>|perlapi/toUPPER_utf8_safe>. |
1012 | 1195 | |
1013 | 1196 | =end original |
1014 | 1197 | |
1015 | この関数は削除されました; | |
1198 | この関数は Perl 5.28 で削除されました; | |
1016 | 変換してください: | |
1199 | 代わりに以下のうち適切なものを呼び出すように変換してください: | |
1017 | 1200 | L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>. |
1018 | 1201 | L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>, |
1019 | 1202 | L<C<toTITLE_utf8_safe>|perlapi/toTITLE_utf8_safe>, |
1020 | 1203 | L<C<toUPPER_utf8_safe>|perlapi/toUPPER_utf8_safe>. |
1021 | 1204 | |
1022 | 1205 | =head2 Perl 5.26 |
1023 | 1206 | |
1024 | 1207 | =head3 C<< --libpods >> in C<< Pod::Html >> |
1025 | 1208 | |
1026 | 1209 | (C<< Pod::Html >> での C<< --libpods >>) |
1027 | 1210 | |
1028 | 1211 | =begin original |
1029 | 1212 | |
1030 | 1213 | Since Perl 5.18, the option C<< --libpods >> has been deprecated, and |
1031 | 1214 | using this option did not do anything other than producing a warning. |
1032 | 1215 | |
1033 | 1216 | =end original |
1034 | 1217 | |
1035 | 1218 | Perl 5.18 から、C<< --libpods >> は廃止予定で、 |
1036 | 1219 | このオプションは警告を出力する以外に何もしていませんでした。 |
1037 | 1220 | |
1038 | 1221 | =begin original |
1039 | 1222 | |
1040 | The C<< --libpods >> option is no longer recognized | |
1223 | The C<< --libpods >> option is no longer recognized as of Perl 5.26. | |
1041 | 1224 | |
1042 | 1225 | =end original |
1043 | 1226 | |
1044 | C<< --libpods >> オプションは Perl 5.26 | |
1227 | C<< --libpods >> オプションは Perl 5.26 からはや認識しなくなりました。 | |
1045 | 1228 | |
1046 | 1229 | =head3 The utilities C<< c2ph >> and C<< pstruct >> |
1047 | 1230 | |
1048 | 1231 | (ユーティリティ C<< c2ph >> と C<< pstruct >>) |
1049 | 1232 | |
1050 | 1233 | =begin original |
1051 | 1234 | |
1052 | 1235 | These old, perl3-era utilities have been deprecated in favour of |
1053 | C<< h2xs >> for a long time. | |
1236 | C<< h2xs >> for a long time. As of Perl 5.26, they have been removed. | |
1054 | 1237 | |
1055 | 1238 | =end original |
1056 | 1239 | |
1057 | 1240 | これらの古い、perl3 時代のユーティリティは、C<< h2xs >> に置き換えられて |
1058 | 1241 | 長い間廃止予定でした。 |
1059 | Perl 5.26 | |
1242 | Perl 5.26 から、これらは削除されました。 | |
1060 | 1243 | |
1061 | 1244 | =head3 Trapping C<< $SIG {__DIE__} >> other than during program exit. |
1062 | 1245 | |
1063 | 1246 | (プログラム終了中以外での C<< $SIG {__DIE__} >> のトラップ) |
1064 | 1247 | |
1065 | 1248 | =begin original |
1066 | 1249 | |
1067 | 1250 | The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was |
1068 | 1251 | never intended to happen this way, but an implementation glitch made |
1069 | 1252 | this possible. This used to be deprecated, as it allowed strange action |
1070 | 1253 | at a distance like rewriting a pending exception in C<$@>. Plans to |
1071 | 1254 | rectify this have been scrapped, as users found that rewriting a |
1072 | 1255 | pending exception is actually a useful feature, and not a bug. |
1073 | 1256 | |
1074 | 1257 | =end original |
1075 | 1258 | |
1076 | 1259 | C<$SIG{__DIE__}> フックは C<eval()> の内側でも呼び出されます。 |
1077 | 1260 | これが起きることは決して意図されていませんでしたが、 |
1078 | 1261 | 実装上の問題によりこれが可能になっていました。 |
1079 | 1262 | これは廃止予定にされていました; なぜなら |
1080 | 1263 | C<$@> の中の保留されている例外を書き換えるというような、 |
1081 | 1264 | 離れた場所でおかしな動作が可能になるからです。 |
1082 | 1265 | これを修正する計画は却下されました; |
1083 | 1266 | ユーザーが、保留している計画を書き換えるのは実際には有用な機能で |
1084 | 1267 | バグではないと発見したからです。 |
1085 | 1268 | |
1086 | 1269 | =begin original |
1087 | 1270 | |
1088 | 1271 | Perl never issued a deprecation warning for this; the deprecation |
1089 | 1272 | was by documentation policy only. But this deprecation has been |
1090 | lifted | |
1273 | lifted as of Perl 5.26. | |
1091 | 1274 | |
1092 | 1275 | =end original |
1093 | 1276 | |
1094 | 1277 | Perl はこれに関する廃止予定警告を出したことはありません; |
1095 | 1278 | 廃止予定は文書分署ポリシーによるものだけです。 |
1096 | 1279 | しかし廃止予定は Perl 5.26 で実行されました。 |
1097 | 1280 | |
1098 | 1281 | =head3 Malformed UTF-8 string in "%s" |
1099 | 1282 | |
1100 | 1283 | ("%s" での不正な UTF-8 文字列) |
1101 | 1284 | |
1102 | 1285 | =begin original |
1103 | 1286 | |
1104 | 1287 | This message indicates a bug either in the Perl core or in XS |
1105 | 1288 | code. Such code was trying to find out if a character, allegedly |
1106 | 1289 | stored internally encoded as UTF-8, was of a given type, such as |
1107 | 1290 | being punctuation or a digit. But the character was not encoded |
1108 | 1291 | in legal UTF-8. The C<%s> is replaced by a string that can be used |
1109 | 1292 | by knowledgeable people to determine what the type being checked |
1110 | 1293 | against was. |
1111 | 1294 | |
1112 | 1295 | =end original |
1113 | 1296 | |
1114 | 1297 | このメッセージは、Perl コアまたは XS コードのバグを示しています。 |
1115 | 1298 | このようなコードは、内部で UTF-8 でエンコードされて保管されたと |
1116 | 1299 | されている文字が、句読点や数字のような特定の種類かどうかを |
1117 | 1300 | 調べようとしています。 |
1118 | 1301 | しかしこの文字は正当な UTF-8 でエンコードされていません。 |
1119 | 1302 | C<%s> は、知識のある人々がどのような種類をチェックしようとしたかを |
1120 | 1303 | 決定するのに使われる文字列で置き換えられます。 |
1121 | 1304 | |
1122 | 1305 | =begin original |
1123 | 1306 | |
1124 | 1307 | Passing malformed strings was deprecated in Perl 5.18, and |
1125 | 1308 | became fatal in Perl 5.26. |
1126 | 1309 | |
1127 | 1310 | =end original |
1128 | 1311 | |
1129 | 1312 | 不正な文字列を渡すのは Perl 5.18 で廃止予定になり、 |
1130 | 1313 | Perl 5.26 で致命的エラーになりました。 |
1131 | 1314 | |
1132 | 1315 | =head2 Perl 5.24 |
1133 | 1316 | |
1134 | 1317 | =head3 Use of C<< *glob{FILEHANDLE} >> |
1135 | 1318 | |
1136 | 1319 | (C<< *glob{FILEHANDLE} >> の使用) |
1137 | 1320 | |
1138 | 1321 | =begin original |
1139 | 1322 | |
1140 | 1323 | The use of C<< *glob{FILEHANDLE} >> was deprecated in Perl 5.8. |
1141 | 1324 | The intention was to use C<< *glob{IO} >> instead, for which |
1142 | 1325 | C<< *glob{FILEHANDLE} >> is an alias. |
1143 | 1326 | |
1144 | 1327 | =end original |
1145 | 1328 | |
1146 | 1329 | C<< *glob{FILEHANDLE} >> の使用は Perl 5.8 で廃止予定になりました。 |
1147 | 1330 | その意図は、C<< *glob{FILEHANDLE} >> が別名である |
1148 | 1331 | C<< *glob{IO} >> を代わりに使うことでした。 |
1149 | 1332 | |
1150 | 1333 | =begin original |
1151 | 1334 | |
1152 | 1335 | However, this feature was undeprecated in Perl 5.24. |
1153 | 1336 | |
1154 | 1337 | =end original |
1155 | 1338 | |
1156 | 1339 | しかし、この機能は Perl 5.24 で廃止予定でなくなりました。 |
1157 | 1340 | |
1158 | 1341 | =head3 Calling POSIX::%s() is deprecated |
1159 | 1342 | |
1160 | 1343 | (POSIX::%s() の呼び出しは廃止予定です) |
1161 | 1344 | |
1162 | 1345 | =begin original |
1163 | 1346 | |
1164 | 1347 | The following functions in the C<POSIX> module are no longer available: |
1165 | 1348 | C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>, |
1166 | 1349 | C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>. The |
1167 | 1350 | functions are buggy and don't work on UTF-8 encoded strings. See their |
1168 | 1351 | entries in L<POSIX> for more information. |
1169 | 1352 | |
1170 | 1353 | =end original |
1171 | 1354 | |
1172 | 1355 | C<POSIX> モジュールの以下の関数はもはや利用できません: |
1173 | 1356 | C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>, |
1174 | 1357 | C<isprint>, C<ispunct>, C<isspace>, C<isupper>, C<isxdigit>。 |
1175 | 1358 | これらの関数はバグっぽく、UTF-8 エンコードされた文字列で動作しません。 |
1176 | 1359 | さらなる情報については L<POSIX> のそれぞれの項目を参照してください。 |
1177 | 1360 | |
1178 | 1361 | =begin original |
1179 | 1362 | |
1180 | 1363 | The functions were deprecated in Perl 5.20, and removed in Perl 5.24. |
1181 | 1364 | |
1182 | 1365 | =end original |
1183 | 1366 | |
1184 | 1367 | これらの関数は Perl 5.20 で廃止予定になり、Perl 5.24 で削除されました。 |
1185 | 1368 | |
1186 | 1369 | =head2 Perl 5.16 |
1187 | 1370 | |
1188 | 1371 | =head3 Use of %s on a handle without * is deprecated |
1189 | 1372 | |
1190 | 1373 | (* なしでのハンドルでの %s は廃止予定です) |
1191 | 1374 | |
1192 | 1375 | =begin original |
1193 | 1376 | |
1194 | 1377 | It used to be possible to use C<tie>, C<tied> or C<untie> on a scalar |
1195 | 1378 | while the scalar holds a typeglob. This caused its filehandle to be |
1196 | 1379 | tied. It left no way to tie the scalar itself when it held a typeglob, |
1197 | 1380 | and no way to untie a scalar that had had a typeglob assigned to it. |
1198 | 1381 | |
1199 | 1382 | =end original |
1200 | 1383 | |
1201 | 1384 | スカラが型グロブを保持しているときにスカラに対して |
1202 | 1385 | C<tie>, C<tied>, C<untie> を使うことが可能でした。 |
1203 | 1386 | これはそのファイルハンドルが tie されていました。 |
1204 | 1387 | 型グロブを保持しているときにスカラ自身を tie したり、 |
1205 | 1388 | 型グロブが代入されているスカラを untie する方法はありませんでした。 |
1206 | 1389 | |
1207 | 1390 | =begin original |
1208 | 1391 | |
1209 | 1392 | This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16. |
1210 | 1393 | |
1211 | 1394 | =end original |
1212 | 1395 | |
1213 | 1396 | これは Perl 5.14 で廃止予定になり、バグは Perl 5.16 で修正されました。 |
1214 | 1397 | |
1215 | 1398 | =begin original |
1216 | 1399 | |
1217 | 1400 | So now C<tie $scalar> will always tie the scalar, not the handle it holds. |
1218 | 1401 | To tie the handle, use C<tie *$scalar> (with an explicit asterisk). The same |
1219 | 1402 | applies to C<tied *$scalar> and C<untie *$scalar>. |
1220 | 1403 | |
1221 | 1404 | =end original |
1222 | 1405 | |
1223 | 1406 | 今では C<tie $scalar> は保持しているハンドルではなく、常にスカラを |
1224 | 1407 | tie します。 |
1225 | 1408 | ハンドルを tie するためには、(明示的なアスタリスク付きの) |
1226 | 1409 | C<tie *$scalar> を使ってください。 |
1227 | 1410 | 同じことは C<tied *$scalar> と C<untie *$scalar> にも適用されます。 |
1228 | 1411 | |
1229 | 1412 | =head1 SEE ALSO |
1230 | 1413 | |
1231 | 1414 | L<warnings>, L<diagnostics>. |
1232 | 1415 | |
1233 | 1416 | =begin meta |
1234 | 1417 | |
1235 | 1418 | Translate: Kentaro Shirakata <argrath@ub32.org> |
1236 | 1419 | Status: completed |
1237 | 1420 | |
1238 | 1421 | =end meta |
1239 | 1422 | |
1240 | 1423 | =cut |