perldeprecation > 5.26.1 との差分

perldeprecation 5.26.1 と 5.32.0 の差分

11
22=encoding euc-jp
33
44=head1 NAME
55
66=begin original
77
88perldeprecation - list Perl deprecations
99
1010=end original
1111
1212perldeprecation - Perl の廃止予定の一覧
1313
1414=head1 DESCRIPTION
1515
1616=begin original
1717
1818The purpose of this document is to document what has been deprecated
1919in Perl, and by which version the deprecated feature will disappear,
2020or, for already removed features, when it was removed.
2121
2222=end original
2323
2424この文書の目的は、Perl で何が廃止予定になったか、どのバージョンで
2525廃止予定の機能が消滅したか、あるいは既に削除された機能については、
2626いつ削除されたかを文書化することです。
2727
2828=begin original
2929
3030This document will try to discuss what alternatives for the deprecated
3131features are available.
3232
3333=end original
3434
3535この文書は、廃止予定の機能についてどんな代替案が利用可能かについて
3636議論しようとしています。
3737
3838=begin original
3939
4040The deprecated features will be grouped by the version of Perl in
4141which they will be removed.
4242
4343=end original
4444
4545廃止予定の機能は、削除される予定の Perl のバージョン毎に
4646グループ分けされています。
4747
48=head2 Perl 5.34
49
50=begin original
51
52There are no deprecations or fatalizations scheduled for Perl 5.34.
53
54=end original
55
56Perl 5.34 で計画されている廃止予定や致命的エラー化はありません。
57
4858=head2 Perl 5.32
4959
5060=head3 Constants from lexical variables potentially modified elsewhere
5161
5262(レキシカル変数からの定数が潜在的にどこからでも変更可能)
5363
5464=begin original
5565
5666You wrote something like
5767
5868=end original
5969
6070次のように書きました:
6171
6272 my $var;
6373 $sub = sub () { $var };
6474
6575=begin original
6676
6777but $var is referenced elsewhere and could be modified after the C<sub>
6878expression is evaluated. Either it is explicitly modified elsewhere
6979(C<$var = 3>) or it is passed to a subroutine or to an operator like
7080C<printf> or C<map>, which may or may not modify the variable.
7181
7282=end original
7383
7484しかし $var はどこかで参照されていて、
7585C<sub> 式が評価された後に変更されるかもしれません。
7686これは、明示的に他の場所から変更されたり (C<$var = 3>)、
7787変数を変更するかもしれないしされないかもしれない
7888C<printf> や C<map> のような演算子やサブルーチンに
7989渡されることによります。
8090
8191=begin original
8292
8393Traditionally, Perl has captured the value of the variable at that
8494point and turned the subroutine into a constant eligible for inlining.
8595In those cases where the variable can be modified elsewhere, this
8696breaks the behavior of closures, in which the subroutine captures
8797the variable itself, rather than its value, so future changes to the
8898variable are reflected in the subroutine's return value.
8999
90100=end original
91101
92102伝統的に、Perl はこの時点で変数の値を捕捉して、
93103サブルーチンをインライン化可能な定数に変えます。
94104変数が他の場所で変更できる場合、これはクロージャの振る舞いを壊します;
95105サブルーチンはその値ではなく変数そのものを捕捉するからです;
96106従って、将来の変数への変更はサブルーチンの返り値に反映されます。
97107
98108=begin original
99109
100110If you intended for the subroutine to be eligible for inlining, then
101111make sure the variable is not referenced elsewhere, possibly by
102112copying it:
103113
104114=end original
105115
106116サブルーチンをインライン化可能にすることを意図している場合は、
107117おそらくコピーすることによって、変数がどこからも
108118参照されていないようにしてください:
109119
110120 my $var2 = $var;
111121 $sub = sub () { $var2 };
112122
113123=begin original
114124
115125If you do want this subroutine to be a closure that reflects future
116126changes to the variable that it closes over, add an explicit C<return>:
117127
118128=end original
119129
120130このサブルーチンを、閉じた変数の将来の変更を反映するクロージャにしたい場合は、
121131明示的な C<return> を追加してください:
122132
123133 my $var;
124134 $sub = sub () { return $var };
125135
126136=begin original
127137
128This usage has been deprecated, and will no longer be allowed in Perl 5.32.
138This usage was deprecated and as of Perl 5.32 is no longer allowed.
129139
130140=end original
131141
132この使用法は廃止予定で、Perl 5.32 以降は許されません。
142この使用法は廃止予定で、Perl 5.32 以降もはや許されません。
133143
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
150C<vec> views its string argument as a sequence of bits. A string
151containing a code point over 0xFF is nonsensical. This usage is
152deprecated in Perl 5.28, and was removed in Perl 5.32.
153
154=end original
155
156C<vec> はその文字列引数をビット列として見ます。
1570xFF を超える符号位置を含む文字列は意味がありません。
158この使用法は Perl 5.28 で廃止予定になり、
159Perl 5.32 で削除されました。
160
161=head3 Use of code points over 0xFF in string bitwise operators
162
163(ビット単位文字列演算子での 0xFF を超える符号位置の使用)
164
165=begin original
166
167The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat their
168operands as strings of bytes. As such, values above 0xFF are
169nonsensical. Some instances of these have been deprecated since Perl
1705.24, and were made fatal in 5.28, but it turns out that in cases where
171the wide characters did not affect the end result, no deprecation
172notice was raised, and so remain legal. Now, all occurrences either are
173fatal or raise a deprecation warning, so that the remaining legal
174occurrences 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
189An example of this is
190
191=end original
192
193この例は:
194
195 "" & "\x{100}"
196
197=begin original
198
199The wide character is not used in the C<&> operation because the left
200operand 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
214The function C<hostname()> in the L<Sys::Hostname> module has always
215been documented to be called with no arguments. Historically it has not
216enforced this, and has actually accepted and ignored any arguments. As a
217result, some users have got the mistaken impression that an argument does
218something useful. To avoid these bugs, the function is being made strict.
219Passing arguments was deprecated in Perl 5.28 and became fatal in Perl 5.32.
220
221=end original
222
223L<Sys::Hostname> モジュールの C<hostname()> 関数は、
224引数なしで呼び出されると常に文書化されていました。
225歴史的にはこれは強制されておらず、実際に引数を受け付けて、
226全て無視していました。
227結果として、引数が何か有用であるという間違った印象を
228一部のユーザーに与えていました。
229これらのバグを避けるために、この関数はより厳密になりました。
230引数を渡すのは Perl 5.28 で廃止予定になり、
231Perl 5.32 で致命的エラーになりました。
232
233=head3 Unescaped left braces in regular expressions
234
235(正規表現中のエスケープされない左中かっこ)
236
237=begin original
238
239The simple rule to remember, if you want to match a literal C<{>
240character (U+007B C<LEFT CURLY BRACKET>) in a regular expression
241pattern, is to escape each literal instance of it in some way.
242Generally easiest is to precede it with a backslash, like C<\{>
243or enclose it in square brackets (C<[{]>). If the pattern
244delimiters are also braces, any matching right brace (C<}>) should
245also be escaped to avoid confusing the parser, for example,
246
247=end original
248
249正規表現パターン中でリテラルな
250C<{> 文字 (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
262Forcing literal C<{> characters to be escaped will enable the Perl
263language to be extended in various ways in future releases. To avoid
264needlessly breaking existing code, the restriction is not enforced in
265contexts where there are unlikely to ever be extensions that could
266conflict with the use there of C<{> as a literal. A non-deprecation
267warning that the left brace is being taken literally is raised in
268contexts where there could be confusion about it.
269
270=end original
271
272リテラルな C<{> 文字のエスケープの強制は、
273Perl 言語が将来のリリースで様々な方法で拡張できるようにするためにします。
274既存のコードを不必要に壊すのを避けるために、この制限は、
275C<{> をリテラルとして使うことと衝突する拡張がなさそうな部分では
276強制されません。
277左中かっこがリテラルに取られているときの非廃止予定警告は、
278それが混乱するかも知れない文脈で発生します。
279
280=begin original
281
282Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it
283started to give deprecation warnings since. These cases were made fatal
284in Perl 5.26. Due to an oversight, not all cases of a use of a literal
285C<{> got a deprecation warning. Some cases started warning in Perl 5.26,
286and were made fatal in Perl 5.30. Other cases started in Perl 5.28,
287and were made fatal in 5.32.
288
289=end original
290
291C<{> のリテラルな使用は 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
305The macros below now require an extra parameter than in versions prior
306to Perl 5.32. The final parameter in each one is a pointer into the
307string supplied by the first parameter beyond which the input will not
308be read. This prevents potential reading beyond the end of the buffer.
309C<isALPHANUMERIC_utf8>,
310C<isASCII_utf8>,
311C<isBLANK_utf8>,
312C<isCNTRL_utf8>,
313C<isDIGIT_utf8>,
314C<isIDFIRST_utf8>,
315C<isPSXSPC_utf8>,
316C<isSPACE_utf8>,
317C<isVERTWS_utf8>,
318C<isWORDCHAR_utf8>,
319C<isXDIGIT_utf8>,
320C<isALPHANUMERIC_LC_utf8>,
321C<isALPHA_LC_utf8>,
322C<isASCII_LC_utf8>,
323C<isBLANK_LC_utf8>,
324C<isCNTRL_LC_utf8>,
325C<isDIGIT_LC_utf8>,
326C<isGRAPH_LC_utf8>,
327C<isIDCONT_LC_utf8>,
328C<isIDFIRST_LC_utf8>,
329C<isLOWER_LC_utf8>,
330C<isPRINT_LC_utf8>,
331C<isPSXSPC_LC_utf8>,
332C<isPUNCT_LC_utf8>,
333C<isSPACE_LC_utf8>,
334C<isUPPER_LC_utf8>,
335C<isWORDCHAR_LC_utf8>,
336C<isXDIGIT_LC_utf8>,
337C<toFOLD_utf8>,
338C<toLOWER_utf8>,
339C<toTITLE_utf8>,
340and
341C<toUPPER_utf8>.
342
343=end original
344
345これらのマクロは Perl 5.32 以前より一つ追加の引数が必要になりました。
346それぞれの最後の引数は、これを超えて入力が読み込まれない、最初の引数で
347指定された文字列へのポインタです。
348これはバッファの末尾を超えて読み込む可能性を防ぎます。
349C<isALPHANUMERIC_utf8>,
350C<isASCII_utf8>,
351C<isBLANK_utf8>,
352C<isCNTRL_utf8>,
353C<isDIGIT_utf8>,
354C<isIDFIRST_utf8>,
355C<isPSXSPC_utf8>,
356C<isSPACE_utf8>,
357C<isVERTWS_utf8>,
358C<isWORDCHAR_utf8>,
359C<isXDIGIT_utf8>,
360C<isALPHANUMERIC_LC_utf8>,
361C<isALPHA_LC_utf8>,
362C<isASCII_LC_utf8>,
363C<isBLANK_LC_utf8>,
364C<isCNTRL_LC_utf8>,
365C<isDIGIT_LC_utf8>,
366C<isGRAPH_LC_utf8>,
367C<isIDCONT_LC_utf8>,
368C<isIDFIRST_LC_utf8>,
369C<isLOWER_LC_utf8>,
370C<isPRINT_LC_utf8>,
371C<isPSXSPC_LC_utf8>,
372C<isPUNCT_LC_utf8>,
373C<isSPACE_LC_utf8>,
374C<isUPPER_LC_utf8>,
375C<isWORDCHAR_LC_utf8>,
376C<isXDIGIT_LC_utf8>,
377C<toFOLD_utf8>,
378C<toLOWER_utf8>,
379C<toTITLE_utf8>,
380C<toUPPER_utf8>.
381
382=begin original
383
384Since Perl 5.26, this functionality with the extra parameter has been
385available by using a corresponding macro to each one of these, and whose
386name is formed by appending C<_safe> to the base name. There is no
387change to the functionality of those. For example, C<isDIGIT_utf8_safe>
388corresponds to C<isDIGIT_utf8>, and both now behave identically. All
389are documented in L<perlapi/Character case changing> and
390L<perlapi/Character classification>.
391
392=end original
393
394Perl 5.26 から、追加の引数の機能は、
395これらのそれぞれに対応するベース名に C<_safe> を追加した形の名前のマクロを
396使うことによって利用可能です。
397これらの機能に変更はありません。
398例えば、C<isDIGIT_utf8_safe> は C<isDIGIT_utf8> に対応し、
399これらは同様に振る舞うようになりました。
400これら全ては L<perlapi/Character case changing> と
401L<perlapi/Character classification> に文書化されています。
402
403=begin original
404
405This change was originally scheduled for 5.30, but was delayed until
4065.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
418C<< File::Glob >> has a function called C<< glob >>, which just calls
419C<< bsd_glob >>.
420
421=end original
422
423C<< File::Glob >> は、単に C<< bsd_glob >> を呼び出す関数
424C<< glob >> を持っています。
425
426=begin original
427
428C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation
429message was issued from Perl 5.26 onwards, and the function has now
430disappeared in Perl 5.30.
431
432=end original
433
434C<< File::Glob::glob() >> は Perl 5.8 に廃止予定になりました。
435廃止予定メッセージは Perl 5.26 から出力されていて、
436この関数は Perl 5.30 で消滅しました。
437
438=begin original
439
440Code using C<< File::Glob::glob() >> should call
441C<< File::Glob::bsd_glob() >> instead.
442
443=end original
444
445C<< File::Glob::glob() >> を使っているコードは代わりに
446C<< File::Glob::bsd_glob() >> を呼び出すべきです。
447
134448=head2 Perl 5.30
135449
136450=head3 C<< $* >> is no longer supported
137451
138452(C<< $* >> はもはや対応しません)
139453
140454=begin original
141455
142456Before Perl 5.10, setting C<< $* >> to a true value globally enabled
143457multi-line matching within a string. This relique from the past lost
144458its special meaning in 5.10. Use of this variable will be a fatal error
145459in Perl 5.30, freeing the variable up for a future special meaning.
146460
147461=end original
148462
149463Perl 5.10 より前では、C<< $* >> に真の値を設定すると、
150464一つの文字列中の複数行マッチングをグローバルに有効にします。
151465この過去からの遺物は 5.10 で特別な意味を失いました。
152466将来の特別な意味のために変数を空けるために、
153467この変数の使用は Perl 5.30 で致命的エラーになります。
154468
155469=begin original
156470
157471To enable multiline matching one should use the C<< /m >> regexp
158472modifier (possibly in combination with C<< /s >>). This can be set
159473on a per match bases, or can be enabled per lexical scope (including
160474a whole file) with C<< use re '/m' >>.
161475
162476=end original
163477
164478複数行マッチングを有効にするためには、
165479(おそらく C<< /s >> と組み合わせて) C<< /m >> 正規表現修飾子を使うべきです。
166480これはマッチング毎で設定したり、C<< use re '/m' >> で (ファイル全体を含む)
167481レキシカルスコープ毎に設定したり出来ます。
168482
169483=head3 C<< $# >> is no longer supported
170484
171485(C<< $# >> はもはや対応しません)
172486
173487=begin original
174488
175489This variable used to have a special meaning -- it could be used
176490to control how numbers were formatted when printed. This seldom
177491used functionality was removed in Perl 5.10. In order to free up
178492the variable for a future special meaning, its use will be a fatal
179493error in Perl 5.30.
180494
181495=end original
182496
183497この変数は特別な意味を持っていました --
184498print したときにいくつフォーマットするかを制御するために使われていました。
185499このほとんど使われない機能は Perl 5.10 で削除されました。
186500将来の特別な意味のために変数を空けるために、
187501この使用は Perl 5.30 で致命的エラーになります。
188502
189503=begin original
190504
191To specify how numbers are formatted when printed, one is adviced
505To specify how numbers are formatted when printed, one is advised
192506to use C<< printf >> or C<< sprintf >> instead.
193507
194508=end original
195509
196510print したときにいくつフォーマットされるかを指定するには、
197511代わりに C<< printf >> や C<< sprintf >> を使うことを勧めます。
198512
513=head3 Assigning non-zero to C<< $[ >> is fatal
514
515(C<< $[ >> への非 0 の代入は致命的エラーになります)
516
517=begin original
518
519This variable (and the corresponding C<array_base> feature and
520L<arybase> module) allowed changing the base for array and string
521indexing operations.
522
523=end original
524
525この変数 (および対応する C<array_base> 機能と L<arybase> モジュール) は
526配列と文字列の添え字操作の底を変更することができました。
527
528=begin original
529
530Setting this to a non-zero value has been deprecated since Perl 5.12 and
531throws a fatal error as of Perl 5.30.
532
533=end original
534
535これに非 0 の値を設定するのは Perl 5.12 から廃止予定になり、
536Perl 5.30 から致命的エラーを投げます。
537
199538=head3 C<< File::Glob::glob() >> will disappear
200539
201540(C<< File::Glob::glob() >> は消滅します)
202541
203542=begin original
204543
205544C<< File::Glob >> has a function called C<< glob >>, which just calls
206545C<< bsd_glob >>. However, its prototype is different from the prototype
207546of C<< CORE::glob >>, and hence, C<< File::Glob::glob >> should not
208547be used.
209548
210549=end original
211550
212551C<< File::Glob >> には C<< glob >> という関数があり、
213552これは単に C<< bsd_glob >> を呼び出します。
214553しかし、そのプロトタイプは C<< CORE::glob >> と異なっているので、
215554C<< File::Glob::glob >> は使うべきではありません。
216555
217556=begin original
218557
219558C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation
220559message was issued from Perl 5.26 onwards, and the function will
221560disappear in Perl 5.30.
222561
223562=end original
224563
225564C<< File::Glob::glob() >> は Perl 5.8 で廃止予定になりました。
226565廃止予定メッセージは Perl 5.26 から出力されるようになり、
227566この関数は Perl 5.30 で消滅します。
228567
229568=begin original
230569
231570Code using C<< File::Glob::glob() >> should call
232571C<< File::Glob::bsd_glob() >> instead.
233572
234573=end original
235574
236575C<< File::Glob::glob() >> を使っているコードは代わりに
237576C<< File::Glob::bsd_glob() >> を呼び出すべきです。
238577
239=head3 Unescaped left braces in regular expressions
578=head3 Unescaped left braces in regular expressions (for 5.30)
240579
241(正規表現中のエスケープされない左中かっこ)
580(正規表現中のエスケープされない左中かっこ(5.30 版))
242581
243582=begin original
244583
245The simple rule to remember, if you want to match a literal C<{>
584See L</Unescaped left braces in regular expressions> above.
246character (U+007B C<LEFT CURLY BRACKET>) in a regular expression
247pattern, is to escape each literal instance of it in some way.
248Generally easiest is to precede it with a backslash, like C<\{>
249or enclose it in square brackets (C<[{]>). If the pattern
250delimiters are also braces, any matching right brace (C<}>) should
251also be escaped to avoid confusing the parser, for example,
252585
253586=end original
254587
255正規表現パターン中でリテラルな
588前述の L</Unescaped left braces in regular expressions> を
256C<{> 文字 (U+007B C<LEFT CURLY BRACKET>) にマッチング場合、
589参照てくださ
257覚えるべき単純な規則は、何らかの形でそれぞれのリテラルな実体を
258エスケープすることです。
259一般的に最も簡単な方法は、C<\{> のように逆スラッシュを前置するか、
260大かっこで囲む (C<[{]>) ことです。
261パターン区切り文字も中かっこなら、例えばパーサの混乱を避けるために、
262マッチングする右中かっこ (C<}>) もエスケープするべきです。
263590
264 qr{abc\{def\}ghi}
265
266=begin original
267
268Forcing literal C<{> characters to be escaped will enable the Perl
269language to be extended in various ways in future releases. To avoid
270needlessly breaking existing code, the restriction is is not enforced in
271contexts where there are unlikely to ever be extensions that could
272conflict with the use there of C<{> as a literal.
273
274=end original
275
276リテラルな C<{> 文字のエスケープの強制は、
277Perl 言語が将来のリリースで様々な方法で拡張できるようにするためにします。
278既存のコードを不必要に壊すのを避けるために、この制限は、
279C<{> をリテラルとして使うことと衝突する拡張がなさそうな部分では
280強制されません。
281
282=begin original
283
284Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it
285started to give deprecation warnings since. These cases were made fatal
286in Perl 5.26. Due to an oversight, not all cases of a use of a literal
287C<{> got a deprecation warning. These cases started warning in Perl 5.26,
288and they will be fatal by Perl 5.30.
289
290=end original
291
292C<{> のリテラルな使用は Perl 5.20 に廃止予定になり、
293一部の使用についてはその時から廃止予定警告が出始めています。
294これらの場合は Perl 5.26 で致命的エラーになりました。
295見過ごしにより、全てのリテラルな C<{> の使用に対して廃止予定警告を
296出していませんでした。
297これらの場合は Perl 5.26 で警告を始め、Perl 5.30 で致命的エラーになります。
298
299591=head3 Unqualified C<dump()>
300592
301593(修飾されない C<dump()>)
302594
303595=begin original
304596
305597Use of C<dump()> instead of C<CORE::dump()> was deprecated in Perl 5.8,
306598and an unqualified C<dump()> will no longer be available in Perl 5.30.
307599
308600=end original
309601
310602C<CORE::dump()> の代わりの C<dump()> の使用は Perl 5.8 で廃止予定になり、
311603修飾されない C<dump()> は Perl 5.30 で利用できなくなります。
312604
313605=begin original
314606
315607See L<perlfunc/dump>.
316608
317609=end original
318610
319611L<perlfunc/dump> を参照してください。
320612
321613=head3 Using my() in false conditional.
322614
323615(偽の条件で my() を使う)
324616
325617=begin original
326618
327619There has been a long-standing bug in Perl that causes a lexical variable
328620not to be cleared at scope exit when its declaration includes a false
329621conditional. Some people have exploited this bug to achieve a kind of
330static variable. Since we intend to fix this bug, we don't want people
622static variable. To allow us to fix this bug, people should not be
331623relying on this behavior.
332624
333625=end original
334626
335627Perl には、宣言が偽の条件を含んでいる場合、スコープを出るときに
336628レキシカル変数がクリアされないという長年のバグがあります。
337629一部の人々はある種の静的変数を達成するためにこのバグを悪用していました。
338私たちこのバグを修正したいので、私たちは人々この振る舞いに
630私たちこのバグを修正できるように、人々この振る舞いに
339依存してほしくありません
631依存しないべきです
340632
341633=begin original
342634
343635Instead, it's recommended one uses C<state> variables to achieve the
344636same effect:
345637
346638=end original
347639
348640代わりに、同じ効果を達成するために C<state> 変数を使うことを勧めます:
349641
350642 use 5.10.0;
351643 sub count {state $counter; return ++ $counter}
352644 say count (); # Prints 1
353645 say count (); # Prints 2
354646
355647=begin original
356648
357649C<state> variables were introduced in Perl 5.10.
358650
359651=end original
360652
361653C<state> 変数は Perl 5.10 で導入されました。
362654
363655=begin original
364656
365657Alternatively, you can achieve a similar static effect by
366declaring the variable in a separate block outside the function, eg
658declaring the variable in a separate block outside the function, e.g.,
367659
368660=end original
369661
370662あるいは、関数の外側の別のブロックの中で変数を宣言することで
371663似たような静的な効果を得られます:
372664
373665 sub f { my $x if 0; return $x++ }
374666
375667=begin original
376668
377669becomes
378670
379671=end original
380672
381673これは次のようになります:
382674
383675 { my $x; sub f { return $x++ } }
384676
385677=begin original
386678
387679The use of C<my()> in a false conditional has been deprecated in
388Perl 5.10, and it will become a fatal error in Perl 5.30.
680Perl 5.10, and became a fatal error in Perl 5.30.
389681
390682=end original
391683
392684偽の条件での C<my()> の使用は Perl 5.10 で廃止予定になり、
393Perl 5.30 で致命的エラーになりま
685Perl 5.30 で致命的エラーになりました
394686
395687=head3 Reading/writing bytes from/to :utf8 handles.
396688
397689(:utf8 ハンドルに対するバイト読み書き)
398690
399691=begin original
400692
401693The sysread(), recv(), syswrite() and send() operators are
402694deprecated on handles that have the C<:utf8> layer, either explicitly, or
403695implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
404696
405697=end original
406698
407699(明示的あるいは C<:encoding(UTF-16LE)> 層のように暗黙的どちらでも)
408700C<:utf8> 層を持つハンドルに対する
409701sysread(), recv(), syswrite(), send() 演算子は廃止予定です。
410702
411703=begin original
412704
413705Both sysread() and recv() currently use only the C<:utf8> flag for the stream,
414706ignoring the actual layers. Since sysread() and recv() do no UTF-8
415707validation they can end up creating invalidly encoded scalars.
416708
417709=end original
418710
419711sysread() と recv() の両方は今のところ C<:utf8> フラグを
420712ストリームのためだけに使い、実際の層は無視します。
421713sysread() と recv() は UTF-8 検証を行わないので、
422714不正にエンコードされたスカラを作ることになるかも知れません。
423715
424716=begin original
425717
426718Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise ignoring
427719any layers. If the flag is set, both write the value UTF-8 encoded, even if
428720the layer is some different encoding, such as the example above.
429721
430722=end original
431723
432724同様に、syswrite() と send() は C<:utf8> フラグのみを使い、
433725その他の層は無視します。
434726フラグが設定されていると、これらは、たとえ層が前述の例のように
435727異なったエンコーディングの場合でも、UTF-8 エンコードされた値を書き込みます。
436728
437729=begin original
438730
439731Ideally, all of these operators would completely ignore the C<:utf8> state,
440732working only with bytes, but this would result in silently breaking existing
441733code. To avoid this a future version of perl will throw an exception when
442734any of sysread(), recv(), syswrite() or send() are called on handle with the
443735C<:utf8> layer.
444736
445737=end original
446738
447739理想的には、これらの演算子全ては完全に C<:utf8> の状態を無視して、
448740バイトに対してのみ動作したいですが、
449741これは既存のコードを暗黙に壊すことになります。
450742これを避けるために、将来のバージョンの Perl では
451743sysread(), recv(), syswrite(), send() が C<:utf8> 層を持った
452744ハンドルで呼び出されると例外を投げる予定です。
453745
454746=begin original
455747
456748In Perl 5.30, it will no longer be possible to use sysread(), recv(),
457749syswrite() or send() to read or send bytes from/to :utf8 handles.
458750
459751=end original
460752
461753Perl 5.30 で、:utf8 ハンドルでバイトを読み書きするために
462754sysread(), recv(), syswrite(), send() を使うことはできなくなります。
463755
464756=head3 Use of unassigned code point or non-standalone grapheme for a delimiter.
465757
466758(区切り文字として未割当符号位置や非独立書記素の使用)
467759
468760=begin original
469761
470762A grapheme is what appears to a native-speaker of a language to be a
471763character. In Unicode (and hence Perl) a grapheme may actually be
472764several adjacent characters that together form a complete grapheme. For
473765example, there can be a base character, like "R" and an accent, like a
474circumflex "^", that appear when displayed to be a single character with
766circumflex "^", that appear to be a single character when displayed,
475the circumflex hovering over the "R". Perl currently allows things like
767with the circumflex hovering over the "R".
476that circumflex to be delimiters of strings, patterns, I<etc>. When
477displayed, the circumflex would look like it belongs to the character
478just to the left of it. In order to move the language to be able to
479accept graphemes as delimiters, we have to deprecate the use of
480delimiters which aren't graphemes by themselves. Also, a delimiter must
481already be assigned (or known to be never going to be assigned) to try
482to future-proof code, for otherwise code that works today would fail to
483compile if the currently unassigned delimiter ends up being something
484that isn't a stand-alone grapheme. Because Unicode is never going to
485assign
486L<non-character code points|perlunicode/Noncharacter code points>, nor
487L<code points that are above the legal Unicode maximum|
488perlunicode/Beyond Unicode code points>, those can be delimiters, and
489their use won't raise this warning.
490768
491769=end original
492770
493771書記素は、言語のネイティブスピーカーにとって文字のように見えるものです。
494772Unicode (従って Perl) では、
495773書記素は実際には互いに完全な書記素を形成するいくつかの隣接する
496774文字かもしれません。
497775例えば、"R" のような基底文字と曲折アクセント "^" のような
498776アクセントかもしれません; これは表示されるときには
499777"R" の上に曲折アクセントがある単一の文字となります。
500Perl は現在の所曲折アクセントのようなものを文字列、パターンなどの
501区切り文字にすることを許しています。
502表示されるとき、曲折アクセントは、
503そのすぐ左にある文字に付属するかのように見えます。
504言語が書記素を区切り文字として受けいられられるようにするために、
505それ自体が書記素でない区切り文字の使用を廃止予定にする必要があります。
506また、区切り文字は将来も動作するコードであり続けるために、
507既に割り当てられている(または決して割り当てられないと分かっている)
508ものでなければなりません;
509さもなければ、もし現在割り当てられていない書記素が単体の書記素でないものに
510なった場合、今日動作しているコードがコンパイルに失敗することになります。
511Unicode は決して
512L<非文字符号位置|perlunicode/Noncharacter code points> や
513L<正当な Unicode の最大値より大きな符号位置|
514perlunicode/Beyond Unicode code points> を割り当てないので、
515これらは区切り文字になることができ、これらの使用は警告を発生させません。
516778
517779=begin original
518780
519In Perl 5.30, delimiters which are unassigned code points, or which
781As of Perl 5.30, use of delimiters which are non-standalone graphemes is
520are non-standalone graphemes will be fatal.
782fatal, in order to move the language to be able to accept
783multi-character graphemes as delimiters.
521784
522785=end original
523786
524Perl 5.30 未定義符号位置や非独立書記素区切り文字にするのは
787Perl 5.30 から、非独立書記素区切り文字として使用致命的エラーです;
525致命的エラーになます。
788これは複数文字書記素を区切文字として受け入れられるように言語を
789動かすためです。
526790
527=head3 In XS code, use of various macros dealing with UTF-8.
528
529(XS コードで、UTF-8 を扱う様々なマクロの使用)
530
531791=begin original
532792
533These macros will require an extra parameter in Perl 5.30:
793Also, as of Perl 5.30, delimiters which are unassigned code points
534C<isALPHANUMERIC_utf8>,
794but that may someday become assigned are prohibited. Otherwise, code
535C<isASCII_utf8>,
795that works today would fail to compile if the currently unassigned
536C<isBLANK_utf8>,
796delimiter ends up being something that isn't a stand-alone grapheme.
537C<isCNTRL_utf8>,
797Because Unicode is never going to assign L<non-character code
538C<isDIGIT_utf8>,
798points|perlunicode/Noncharacter code points>, nor L<code points that are
539C<isIDFIRST_utf8>,
799above the legal Unicode maximum|perlunicode/Beyond Unicode code
540C<isPSXSPC_utf8>,
800points>, those can be delimiters.
541C<isSPACE_utf8>,
542C<isVERTWS_utf8>,
543C<isWORDCHAR_utf8>,
544C<isXDIGIT_utf8>,
545C<isALPHANUMERIC_LC_utf8>,
546C<isALPHA_LC_utf8>,
547C<isASCII_LC_utf8>,
548C<isBLANK_LC_utf8>,
549C<isCNTRL_LC_utf8>,
550C<isDIGIT_LC_utf8>,
551C<isGRAPH_LC_utf8>,
552C<isIDCONT_LC_utf8>,
553C<isIDFIRST_LC_utf8>,
554C<isLOWER_LC_utf8>,
555C<isPRINT_LC_utf8>,
556C<isPSXSPC_LC_utf8>,
557C<isPUNCT_LC_utf8>,
558C<isSPACE_LC_utf8>,
559C<isUPPER_LC_utf8>,
560C<isWORDCHAR_LC_utf8>,
561C<isXDIGIT_LC_utf8>,
562C<toFOLD_utf8>,
563C<toLOWER_utf8>,
564C<toTITLE_utf8>,
565and
566C<toUPPER_utf8>.
567801
568802=end original
569803
570これらのマクロは Perl 5.30 で追加の引数を必要になます:
804また、Perl 5.30 から、いつか割当てられるかも知れない
571C<isALPHANUMERIC_utf8>,
805非割り当て符号位置の区切り文字も禁止されます。
572C<isASCII_utf8>,
806さもなければ、もし現在割り当てられていない書記素が単体の書記素でないものに
573C<isBLANK_utf8>,
807なった場合、今日動作しているコードがコンパイルに失敗することになります。
574C<isCNTRL_utf8>,
808Unicode は決して
575C<isDIGIT_utf8>,
809L<非文字符号位置|perlunicode/Noncharacter code points>
576C<isIDFIRST_utf8>,
810L<正当な Unicode の最大値より大きな符号位置|
577C<isPSXSPC_utf8>,
811perlunicode/Beyond Unicode code points> を割り当てないので、
578C<isSPACE_utf8>,
812これらは区切り文字になることができます。
579C<isVERTWS_utf8>,
580C<isWORDCHAR_utf8>,
581C<isXDIGIT_utf8>,
582C<isALPHANUMERIC_LC_utf8>,
583C<isALPHA_LC_utf8>,
584C<isASCII_LC_utf8>,
585C<isBLANK_LC_utf8>,
586C<isCNTRL_LC_utf8>,
587C<isDIGIT_LC_utf8>,
588C<isGRAPH_LC_utf8>,
589C<isIDCONT_LC_utf8>,
590C<isIDFIRST_LC_utf8>,
591C<isLOWER_LC_utf8>,
592C<isPRINT_LC_utf8>,
593C<isPSXSPC_LC_utf8>,
594C<isPUNCT_LC_utf8>,
595C<isSPACE_LC_utf8>,
596C<isUPPER_LC_utf8>,
597C<isWORDCHAR_LC_utf8>,
598C<isXDIGIT_LC_utf8>,
599C<toFOLD_utf8>,
600C<toLOWER_utf8>,
601C<toTITLE_utf8>,
602C<toUPPER_utf8>.
603813
604=begin original
605
606There is now a macro that corresponds to each one of these, simply by
607appending C<_safe> to the name. It takes the extra parameter.
608For example, C<isDIGIT_utf8_safe> corresponds to C<isDIGIT_utf8>, but
609takes the extra parameter, and its use doesn't generate a deprecation
610warning. All are documented in L<perlapi/Character case changing> and
611L<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> と
620L<perlapi/Character classification> に文書化されています。
621
622=begin original
623
624You can change to use these versions at any time, or, if you can live
625with the deprecation messages, wait until 5.30 and add the parameter to
626the existing calls, without changing the names.
627
628=end original
629
630これらのバージョンをすぐに使うこともできますし、
631廃止予定メッセージと共に生きることができるなら、
6325.30 まで待って、名前を変更することなく既存の呼び出しに引数を
633追加することもできます。
634
635814=head2 Perl 5.28
636815
637=head3 Attribute "%s" is deprecated, and will disappear in 5.28
816=head3 Attributes C<< :locked >> and C<< :unique >>
638817
639(属性 "%s" は廃止予定で、5.28 に消滅します)
818(属性 C<< :locked >> と C<< :unique >>)
640819
641820=begin original
642821
643822The attributes C<< :locked >> (on code references) and C<< :unique >>
644823(on array, hash and scalar references) have had no effect since
645824Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated
646825since.
647826
648827=end original
649828
650829属性 (コードリファレンスに対する) C<< :locked >> および
651830(配列、ハッシュ、スカラリファレンスに対する) C<< :unique >> は
652831それぞれ Perl Perl 5.005 と Perl 5.8.8 から何もしなくなっていました。
653832これらの使用はその時から廃止予定でした。
654833
655834=begin original
656835
657These attributes will no longer be recognized in Perl 5.28, and will
836As of Perl 5.28, these attributes are syntax errors. Since the
658then result in a syntax error. Since the attributes do not do anything,
837attributes do not do anything, removing them from your code fixes
659removing them from your code fixes the deprecation warning; and removing
838the syntax error; and removing them will not influence the behaviour
660them will not influence the behaviour of your code.
839of your code.
661840
662841=end original
663842
664これらの属性は Perl 5.28 から認識しなくなり、文法エラーとなります。
843Perl 5.28 から、これらの属性は文法エラーとなります。
665844これらの属性は何もしないので、コードからこれらを削除すれば
666廃止予定警告を修正でき、削除することによってコードの振る舞いには
845文法エラーを修正でき、削除することによってコードの振る舞いには
667846影響ありません。
668847
669848=head3 Bare here-document terminators
670849
671850(空のヒヤドキュメント終端子)
672851
673852=begin original
674853
675854Perl has allowed you to use a bare here-document terminator to have the
676855here-document end at the first empty line. This practise was deprecated
677in Perl 5.000, and this will be a fatal error in Perl 5.28.
856in Perl 5.000; as of Perl 5.28, using a bare here-document terminator
857throws a fatal error.
678858
679859=end original
680860
681861Perl は、最初の空行をヒヤドキュメントの末尾とするために空の
682862ヒヤドキュメント終端子を使うことを許していました。
683この監修は Perl 5.000 で廃止予定になり、Perl 5.28 で
863この監修は Perl 5.000 で廃止予定になりました;
684致命的エラーになる予定です。
864Perl 5.28 から、裸のヒヤドキュメント終端子の使用は
865致命的エラーを投げます。
685866
686867=begin original
687868
688You are encouraged to use the explictly quoted form if you wish to
869You are encouraged to use the explicitly quoted form if you wish to
689870use an empty line as the terminator of the here-document:
690871
691872=end original
692873
693874ヒヤドキュメントの終端子として空行を使いたい場合は、
694875明示的にクォートした形式を使うことが推奨されます:
695876
696877 print <<"";
697878 Print this line.
698879
699880 # Previous blank line ends the here-document.
700881
701882=head3 Setting $/ to a reference to a non-positive integer
702883
703884($/ に非正整数へのリファレンスを設定)
704885
705886=begin original
706887
707888You assigned a reference to a scalar to C<$/> where the
708889referenced item is not a positive integer. In older perls this B<appeared>
709890to work the same as setting it to C<undef> but was in fact internally
710891different, less efficient and with very bad luck could have resulted in
711892your file being split by a stringified form of the reference.
712893
713894=end original
714895
715896リファレンスが差しているのが非正整数のときにそのリファレンスを
716897C<$/> に代入しました。
717898より古い Perl では、これは C<undef> を設定するのと同じ
718899B<ように見えます> が、実際内部では異なり、
719900より効率が悪く、とても運が悪いとファイルがリファレンスの文字列化形式で
720901分割されることになります。
721902
722903=begin original
723904
724905In Perl 5.20.0 this was changed so that it would be B<exactly> the same as
725906setting C<$/> to undef, with the exception that this warning would be
726907thrown.
727908
728909=end original
729910
730911Perl 5.20.0 では、これは例外が投げられることを除けば、
731912B<正確に> C<$/> に undef を設定するのと同じです。
732913
733914=begin original
734915
735In Perl 5.28, this will throw a fatal error.
916As of Perl 5.28, setting C<$/> to a reference of a non-positive
917integer throws a fatal error.
736918
737919=end original
738920
739Perl 5.28 これは致命的エラーなる予
921Perl 5.28 からC<$/> 非正整数へのリファレンスを設定すると
922致命的エラーを投げます。
740923
741924=begin original
742925
743926You are recommended to change your code to set C<$/> to C<undef> explicitly
744927if you wish to slurp the file.
745928
746929=end original
747930
748931ファイルを吸い込みたい場合、明示的に C<$/> に C<undef> を設定するように
749932コードを変更することを薦めます。
750933
751934=head3 Limit on the value of Unicode code points.
752935
753936(Unicode 符号位置の値の制限)
754937
755938=begin original
756939
757Unicode only allows code points up to 0x10FFFF, but Perl allows much
940Unicode only allows code points up to 0x10FFFF, but Perl allows
758larger ones. However, using code points exceeding the maximum value
941much larger ones. Up till Perl 5.28, it was allowed to use code
759of an integer (C<IV_MAX>) may break the perl interpreter in some constructs,
942points exceeding the maximum value of an integer (C<IV_MAX>).
760including causing it to hang in a few cases. The known problem areas
943However, that did break the perl interpreter in some constructs,
761are in C<tr///>, regular expression pattern matching using quantifiers,
944including causing it to hang in a few cases. The known problem
762as quote delimiters in C<qI<X>...I<X>> (where I<X> is the C<chr()> of a large
945areas were in C<tr///>, regular expression pattern matching using
763code point), and as the upper limits in loops.
946quantifiers, as quote delimiters in C<qI<X>...I<X>> (where I<X> is
947the C<chr()> of a large code point), and as the upper limits in
948loops.
764949
765950=end original
766951
767952Unicode は 0x10FFFF までの符号位置だけを許していますが、
768953Perl はもっと大きなものも許しています。
769しかし、整数の最大値 (C<IV_MAX>) を超える符号位置は一部の構文で
954Perl 5.28 まで、整数の最大値 (C<IV_MAX>) を超える符号位置を許していました。
770perl インタプリタを壊すことがあり、一部の場合はハングアップを引き起こします。
955しかし、これは一部の構文でperl インタプリタを壊すことがあり、
956一部の場合はハングアップを引き起こします。
771957問題があることが知られている分野は
772958C<tr///>、量指定子を使った正規表現パターンマッチング
773959C<qI<X>...I<X>> の中でのクォート区切り文字
774(I<X> は大きな符号位置の C<chr()>)、ループの上限で
960(I<X> は大きな符号位置の C<chr()>)、ループの上限でした
775961
776962=begin original
777963
778The use of out of range code points was deprecated in Perl 5.24, and
964The use of out of range code points was deprecated in Perl 5.24; as of
779it will be a fatal error in Perl 5.28.
965Perl 5.28 using a code point exceeding C<IV_MAX> throws a fatal error.
780966
781967=end original
782968
783範囲外の符号位置の使用は Perl 5.24 で廃止予定になり
969範囲外の符号位置の使用は Perl 5.24 で廃止予定になりました;
784Perl 5.28 致命的エラーになります。
970Perl 5.28 から、C<IV_MAX> を超える符号位置の使用は致命的エラーを投げます。
785971
786972=begin original
787973
788974If your code is to run on various platforms, keep in mind that the upper
789limit depends on the platform. It is much larger on 64-bit word sizes
975limit depends on the platform. It is much larger on 64-bit word sizes
790than 32-bit ones.
976than 32-bit ones. For 32-bit integers, C<IV_MAX> equals C<0x7FFFFFFF>,
977for 64-bit integers, C<IV_MAX> equals C<0x7FFFFFFFFFFFFFFF>.
791978
792979=end original
793980
794981あなたのコードを様々なプラットフォームで実行するためには、
795982上限はプラットフォームに依存することを覚えておいてください。
796983これは 64 ビットワードサイズでは 32 ビットのものより遙かに大きいです。
98432 ビット整数では C<IV_MAX> は C<0x7FFFFFFF> で、
98564 ビット整数では C<IV_MAX> は C<0x7FFFFFFFFFFFFFFF> です。
797986
798987=head3 Use of comma-less variable list in formats.
799988
800989(フォーマットでのカンマなしの変数リストの使用)
801990
802991=begin original
803992
804It's allowed to use a list of variables in a format, without
993It was allowed to use a list of variables in a format, without
805994separating them with commas. This usage has been deprecated
806for a long time, and it will be a fatal error in Perl 5.28.
995for a long time, and as of Perl 5.28, this throws a fatal error.
807996
808997=end original
809998
810999フォーマットで、分割するカンマなしの変数のリストを使うことが
8111000許されていました。
812この使用法は長い間廃止予定で、Perl 5.28 致命的エラーになります。
1001この使用法は長い間廃止予定で、Perl 5.28 からこれは致命的エラーを投げます。
8131002
8141003=head3 Use of C<\N{}>
8151004
8161005(C<\N{}> の使用)
8171006
8181007=begin original
8191008
8201009Use of C<\N{}> with nothing between the braces was deprecated in
821Perl 5.24, and will throw a fatal error in Perl 5.28.
1010Perl 5.24, and throws a fatal error as of Perl 5.28.
8221011
8231012=end original
8241013
8251014中かっこの中に何もない C<\N{}> の使用は Perl 5.24 で廃止予定になり、
826Perl 5.28 致命的エラーを投げる予定です。
1015Perl 5.28 から致命的エラーを投げす。
8271016
8281017=begin original
8291018
8301019Since such a construct is equivalent to using an empty string,
8311020you are recommended to remove such C<\N{}> constructs.
8321021
8331022=end original
8341023
8351024このような構文は空文字列を使うのと等価なので、
8361025このような C<\N{}> 構文を削除することを勧めます。
8371026
8381027=head3 Using the same symbol to open a filehandle and a dirhandle
8391028
8401029(ファイルハンドルとディレクトリハンドルで同じシンボルを使う)
8411030
8421031=begin original
8431032
8441033It used to be legal to use C<open()> to associate both a
8451034filehandle and a dirhandle to the same symbol (glob or scalar).
8461035This idiom is likely to be confusing, and it was deprecated in
8471036Perl 5.10.
8481037
8491038=end original
8501039
8511040ファイルハンドルとディレクトリハンドルに同じシンボル
8521041(グロブまたはスカラ) を代入するのに C<open()> を使うのは、
8531042以前は正当でした。
8541043この慣用句は混乱を起こしやすく、Perl 5.10 で廃止予定になりました。
8551044
8561045=begin original
8571046
8581047Using the same symbol to C<open()> a filehandle and a dirhandle
859will be a fatal error in Perl 5.28.
1048throws a fatal error as of Perl 5.28.
8601049
8611050=end original
8621051
8631052ファイルハンドルとディレクトリハンドルを C<open()> するのに
864同じシンボルを使うのは Perl 5.28 致命的エラーになる予定です。
1053同じシンボルを使うのは Perl 5.28 から致命的エラーを投げます。
8651054
8661055=begin original
8671056
8681057You should be using two different symbols instead.
8691058
8701059=end original
8711060
8721061代わりに二つの異なったシンボルを使うようにしてください。
8731062
8741063=head3 ${^ENCODING} is no longer supported.
8751064
8761065(${^ENCODING} はもはや対応しません)
8771066
8781067=begin original
8791068
8801069The special variable C<${^ENCODING}> was used to implement
8811070the C<encoding> pragma. Setting this variable to anything other
8821071than C<undef> was deprecated in Perl 5.22. Full deprecation
8831072of the variable happened in Perl 5.25.3.
8841073
8851074=end original
8861075
8871076特殊変数 C<${^ENCODING}> は C<encoding> プラグマを実装するために
8881077使われていました。
8891078この変数を C<undef> 以外の値に設定するのは Perl 5.22 で廃止予定になりました。
8901079この変数の完全な廃止予定は Perl 5.25.3 で起こりました。
8911080
8921081=begin original
8931082
894Setting this variable will become a fatal error in Perl 5.28.
1083Setting this variable to anything other than an undefined value
1084throws a fatal error as of Perl 5.28.
8951085
8961086=end original
8971087
898この変数の設定は Perl 5.28 で致命的エラーになる予定で
1088この変数に未定義値以外ものを設定するのは
1089Perl 5.28 から致命的エラーを投げます。
8991090
9001091=head3 C<< B::OP::terse >>
9011092
9021093=begin original
9031094
9041095This method, which just calls C<< B::Concise::b_terse >>, has been
905deprecated, and will disappear in Perl 5.28. Please use
1096deprecated, and disappeared in Perl 5.28. Please use
9061097C<< B::Concise >> instead.
9071098
9081099=end original
9091100
9101101単に C<< B::Concise::b_terse >> を呼び出すこのメソッドは廃止予定で、
911Perl 5.28 消滅する予定です
1102Perl 5.28 消滅しました
9121103代わりに C<< B::Concise >> を使ってください。
9131104
914=head3 Use of inherited AUTOLOAD for non-method %s() is deprecated
1105=head3 Use of inherited AUTOLOAD for non-method %s::%s() is no longer allowed
9151106
916(非メソッド %s() のための継承された AUTOLOAD は廃止予定です)
1107(非メソッド %s() のための継承された AUTOLOAD はもはや許されません)
9171108
9181109=begin original
9191110
920As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked
1111As an (ahem) accidental feature, C<AUTOLOAD> subroutines were looked
9211112up as methods (using the C<@ISA> hierarchy) even when the subroutines
9221113to be autoloaded were called as plain functions (e.g. C<Foo::bar()>),
9231114not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>).
9241115
9251116=end original
9261117
9271118ある (ゴホン) 偶発的な機能として、C<AUTOLOAD> サブルーチンは、
9281119たとえ autoload されるサブルーチンが
9291120(C<< Foo->bar() >> や C<< $obj->bar() >> のように)メソッドとしてではなく
9301121(C<Foo::bar()> のように)普通の関数として呼び出されても、
931(C<@ISA> 階層を使って) メソッドして検索されま
1122(C<@ISA> 階層を使って) メソッドして検索されていした
9321123
9331124=begin original
9341125
935This bug will be rectified in future by using method lookup only for
1126This bug was deprecated in Perl 5.004, has been rectified in Perl 5.28
936methods' C<AUTOLOAD>s.
1127by using method lookup only for methods' C<AUTOLOAD>s.
9371128
9381129=end original
9391130
940このバグは、メソッドの C<AUTOLOAD> の場合のみメソッド検索を
1131このバグは Perl 5.004 で廃止予定なり、
941使うように将来修正されます。
1132Perl 5.28 でメソッドの C<AUTOLOAD> のみでメソッド検索するように
1133修正されました。
9421134
9431135=begin original
9441136
9451137The simple rule is: Inheritance will not work when autoloading
9461138non-methods. The simple fix for old code is: In any module that used
9471139to depend on inheriting C<AUTOLOAD> for non-methods from a base class
9481140named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during
9491141startup.
9501142
9511143=end original
9521144
9531145単純な規則は: 継承は非メソッドを autoload された時には動作しません。
9541146古いコードのための簡単な修正方法は:
9551147C<BaseClass> という名前のベースクラスから非メソッドの
9561148C<AUTOLOAD> を継承することに依存しているそれぞれのモジュールで、
9571149起動時に C<*AUTOLOAD = \&BaseClass::AUTOLOAD> を実行します。
9581150
9591151=begin original
9601152
9611153In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);>
9621154you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
9631155C<use AutoLoader 'AUTOLOAD';>.
9641156
9651157=end original
9661158
9671159現在 C<use AutoLoader; @ISA = qw(AutoLoader);> としているコードは、
9681160@ISA から AutoLoader を削除して、
9691161C<use AutoLoader;> を C<use AutoLoader 'AUTOLOAD';> に変更するべきです。
9701162
971=begin original
972
973This 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
9801163=head3 Use of code points over 0xFF in string bitwise operators
9811164
9821165(0xFF を超える符号位置に対する文字列ビット単位演算子の使用)
9831166
9841167=begin original
9851168
9861169The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat
9871170their operands as strings of bytes. As such, values above 0xFF
9881171are nonsensical. Using such code points with these operators
989was deprecated in Perl 5.24, and will be fatal in Perl 5.28.
1172was deprecated in Perl 5.24, and is fatal as of Perl 5.28.
9901173
9911174=end original
9921175
9931176文字列ビット単位演算子 C<&>, C<|>, C<^>, C<~> は
9941177そのオペランドをバイト文字列として扱います。
9951178従って、0xFF を超える値は意味がありません。
9961179これらの演算子を使ったこのような符号位置の使用は
997Perl 5.24 で廃止予定なり、Perl 5.28 で致命的エラーる予定です
1180Perl 5.24 で廃止予定なり、Perl 5.28 で致命的エラーりました
9981181
9991182=head3 In XS code, use of C<to_utf8_case()>
10001183
10011184(XS コード内での C<to_utf8_case()> の使用)
10021185
10031186=begin original
10041187
1005This function is being removed; instead convert to call
1188This function has been removed as of Perl 5.28; instead convert to call
10061189the appropriate one of:
10071190L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>.
10081191L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>,
10091192L<C<toTITLE_utf8_safe>|perlapi/toTITLE_utf8_safe>,
10101193or
10111194L<C<toUPPER_utf8_safe>|perlapi/toUPPER_utf8_safe>.
10121195
10131196=end original
10141197
1015この関数は削除されました; 代わりに以下のうち適切なものを呼び出すように
1198この関数は Perl 5.28 で削除されました;
1016変換してください:
1199代わりに以下のうち適切なものを呼び出すように変換してください:
10171200L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>.
10181201L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>,
10191202L<C<toTITLE_utf8_safe>|perlapi/toTITLE_utf8_safe>,
10201203L<C<toUPPER_utf8_safe>|perlapi/toUPPER_utf8_safe>.
10211204
10221205=head2 Perl 5.26
10231206
10241207=head3 C<< --libpods >> in C<< Pod::Html >>
10251208
10261209(C<< Pod::Html >> での C<< --libpods >>)
10271210
10281211=begin original
10291212
10301213Since Perl 5.18, the option C<< --libpods >> has been deprecated, and
10311214using this option did not do anything other than producing a warning.
10321215
10331216=end original
10341217
10351218Perl 5.18 から、C<< --libpods >> は廃止予定で、
10361219このオプションは警告を出力する以外に何もしていませんでした。
10371220
10381221=begin original
10391222
1040The C<< --libpods >> option is no longer recognized in Perl 5.26.
1223The C<< --libpods >> option is no longer recognized as of Perl 5.26.
10411224
10421225=end original
10431226
1044C<< --libpods >> オプションは Perl 5.26 でもはや認識しなくなりました。
1227C<< --libpods >> オプションは Perl 5.26 からはや認識しなくなりました。
10451228
10461229=head3 The utilities C<< c2ph >> and C<< pstruct >>
10471230
10481231(ユーティリティ C<< c2ph >> と C<< pstruct >>)
10491232
10501233=begin original
10511234
10521235These old, perl3-era utilities have been deprecated in favour of
1053C<< h2xs >> for a long time. In Perl 5.26, they have been removed.
1236C<< h2xs >> for a long time. As of Perl 5.26, they have been removed.
10541237
10551238=end original
10561239
10571240これらの古い、perl3 時代のユーティリティは、C<< h2xs >> に置き換えられて
10581241長い間廃止予定でした。
1059Perl 5.26 、これらは削除されました。
1242Perl 5.26 から、これらは削除されました。
10601243
10611244=head3 Trapping C<< $SIG {__DIE__} >> other than during program exit.
10621245
10631246(プログラム終了中以外での C<< $SIG {__DIE__} >> のトラップ)
10641247
10651248=begin original
10661249
10671250The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was
10681251never intended to happen this way, but an implementation glitch made
10691252this possible. This used to be deprecated, as it allowed strange action
10701253at a distance like rewriting a pending exception in C<$@>. Plans to
10711254rectify this have been scrapped, as users found that rewriting a
10721255pending exception is actually a useful feature, and not a bug.
10731256
10741257=end original
10751258
10761259C<$SIG{__DIE__}> フックは C<eval()> の内側でも呼び出されます。
10771260これが起きることは決して意図されていませんでしたが、
10781261実装上の問題によりこれが可能になっていました。
10791262これは廃止予定にされていました; なぜなら
10801263C<$@> の中の保留されている例外を書き換えるというような、
10811264離れた場所でおかしな動作が可能になるからです。
10821265これを修正する計画は却下されました;
10831266ユーザーが、保留している計画を書き換えるのは実際には有用な機能で
10841267バグではないと発見したからです。
10851268
10861269=begin original
10871270
10881271Perl never issued a deprecation warning for this; the deprecation
10891272was by documentation policy only. But this deprecation has been
1090lifted in Perl 5.26.
1273lifted as of Perl 5.26.
10911274
10921275=end original
10931276
10941277Perl はこれに関する廃止予定警告を出したことはありません;
10951278廃止予定は文書分署ポリシーによるものだけです。
10961279しかし廃止予定は Perl 5.26 で実行されました。
10971280
10981281=head3 Malformed UTF-8 string in "%s"
10991282
11001283("%s" での不正な UTF-8 文字列)
11011284
11021285=begin original
11031286
11041287This message indicates a bug either in the Perl core or in XS
11051288code. Such code was trying to find out if a character, allegedly
11061289stored internally encoded as UTF-8, was of a given type, such as
11071290being punctuation or a digit. But the character was not encoded
11081291in legal UTF-8. The C<%s> is replaced by a string that can be used
11091292by knowledgeable people to determine what the type being checked
11101293against was.
11111294
11121295=end original
11131296
11141297このメッセージは、Perl コアまたは XS コードのバグを示しています。
11151298このようなコードは、内部で UTF-8 でエンコードされて保管されたと
11161299されている文字が、句読点や数字のような特定の種類かどうかを
11171300調べようとしています。
11181301しかしこの文字は正当な UTF-8 でエンコードされていません。
11191302C<%s> は、知識のある人々がどのような種類をチェックしようとしたかを
11201303決定するのに使われる文字列で置き換えられます。
11211304
11221305=begin original
11231306
11241307Passing malformed strings was deprecated in Perl 5.18, and
11251308became fatal in Perl 5.26.
11261309
11271310=end original
11281311
11291312不正な文字列を渡すのは Perl 5.18 で廃止予定になり、
11301313Perl 5.26 で致命的エラーになりました。
11311314
11321315=head2 Perl 5.24
11331316
11341317=head3 Use of C<< *glob{FILEHANDLE} >>
11351318
11361319(C<< *glob{FILEHANDLE} >> の使用)
11371320
11381321=begin original
11391322
11401323The use of C<< *glob{FILEHANDLE} >> was deprecated in Perl 5.8.
11411324The intention was to use C<< *glob{IO} >> instead, for which
11421325C<< *glob{FILEHANDLE} >> is an alias.
11431326
11441327=end original
11451328
11461329C<< *glob{FILEHANDLE} >> の使用は Perl 5.8 で廃止予定になりました。
11471330その意図は、C<< *glob{FILEHANDLE} >> が別名である
11481331C<< *glob{IO} >> を代わりに使うことでした。
11491332
11501333=begin original
11511334
11521335However, this feature was undeprecated in Perl 5.24.
11531336
11541337=end original
11551338
11561339しかし、この機能は Perl 5.24 で廃止予定でなくなりました。
11571340
11581341=head3 Calling POSIX::%s() is deprecated
11591342
11601343(POSIX::%s() の呼び出しは廃止予定です)
11611344
11621345=begin original
11631346
11641347The following functions in the C<POSIX> module are no longer available:
11651348C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>,
11661349C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>. The
11671350functions are buggy and don't work on UTF-8 encoded strings. See their
11681351entries in L<POSIX> for more information.
11691352
11701353=end original
11711354
11721355C<POSIX> モジュールの以下の関数はもはや利用できません:
11731356C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>,
11741357C<isprint>, C<ispunct>, C<isspace>, C<isupper>, C<isxdigit>。
11751358これらの関数はバグっぽく、UTF-8 エンコードされた文字列で動作しません。
11761359さらなる情報については L<POSIX> のそれぞれの項目を参照してください。
11771360
11781361=begin original
11791362
11801363The functions were deprecated in Perl 5.20, and removed in Perl 5.24.
11811364
11821365=end original
11831366
11841367これらの関数は Perl 5.20 で廃止予定になり、Perl 5.24 で削除されました。
11851368
11861369=head2 Perl 5.16
11871370
11881371=head3 Use of %s on a handle without * is deprecated
11891372
11901373(* なしでのハンドルでの %s は廃止予定です)
11911374
11921375=begin original
11931376
11941377It used to be possible to use C<tie>, C<tied> or C<untie> on a scalar
11951378while the scalar holds a typeglob. This caused its filehandle to be
11961379tied. It left no way to tie the scalar itself when it held a typeglob,
11971380and no way to untie a scalar that had had a typeglob assigned to it.
11981381
11991382=end original
12001383
12011384スカラが型グロブを保持しているときにスカラに対して
12021385C<tie>, C<tied>, C<untie> を使うことが可能でした。
12031386これはそのファイルハンドルが tie されていました。
12041387型グロブを保持しているときにスカラ自身を tie したり、
12051388型グロブが代入されているスカラを untie する方法はありませんでした。
12061389
12071390=begin original
12081391
12091392This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16.
12101393
12111394=end original
12121395
12131396これは Perl 5.14 で廃止予定になり、バグは Perl 5.16 で修正されました。
12141397
12151398=begin original
12161399
12171400So now C<tie $scalar> will always tie the scalar, not the handle it holds.
12181401To tie the handle, use C<tie *$scalar> (with an explicit asterisk). The same
12191402applies to C<tied *$scalar> and C<untie *$scalar>.
12201403
12211404=end original
12221405
12231406今では C<tie $scalar> は保持しているハンドルではなく、常にスカラを
12241407tie します。
12251408ハンドルを tie するためには、(明示的なアスタリスク付きの)
12261409C<tie *$scalar> を使ってください。
12271410同じことは C<tied *$scalar> と C<untie *$scalar> にも適用されます。
12281411
12291412=head1 SEE ALSO
12301413
12311414L<warnings>, L<diagnostics>.
12321415
12331416=begin meta
12341417
12351418Translate: Kentaro Shirakata <argrath@ub32.org>
12361419Status: completed
12371420
12381421=end meta
12391422
12401423=cut