5.30.0

名前

perldeprecation - list Perl deprecations

perldeprecation - Perl の廃止予定の一覧

説明

The purpose of this document is to document what has been deprecated in Perl, and by which version the deprecated feature will disappear, or, for already removed features, when it was removed.

この文書の目的は、Perl で何が廃止予定になったか、どのバージョンで 廃止予定の機能が消滅したか、あるいは既に削除された機能については、 いつ削除されたかを文書化することです。

This document will try to discuss what alternatives for the deprecated features are available.

この文書は、廃止予定の機能についてどんな代替案が利用可能かについて 議論しようとしています。

The deprecated features will be grouped by the version of Perl in which they will be removed.

廃止予定の機能は、削除される予定の Perl のバージョン毎に グループ分けされています。

Perl 5.32

レキシカル変数からの定数が潜在的にどこからでも変更可能

You wrote something like

次のように書きました:

    my $var;
    $sub = sub () { $var };

but $var is referenced elsewhere and could be modified after the sub expression is evaluated. Either it is explicitly modified elsewhere ($var = 3) or it is passed to a subroutine or to an operator like printf or map, which may or may not modify the variable.

しかし $var はどこかで参照されていて、 sub 式が評価された後に変更されるかもしれません。 これは、明示的に他の場所から変更されたり ($var = 3)、 変数を変更するかもしれないしされないかもしれない printfmap のような演算子やサブルーチンに 渡されることによります。

Traditionally, Perl has captured the value of the variable at that point and turned the subroutine into a constant eligible for inlining. In those cases where the variable can be modified elsewhere, this breaks the behavior of closures, in which the subroutine captures the variable itself, rather than its value, so future changes to the variable are reflected in the subroutine's return value.

伝統的に、Perl はこの時点で変数の値を捕捉して、 サブルーチンをインライン化可能な定数に変えます。 変数が他の場所で変更できる場合、これはクロージャの振る舞いを壊します; サブルーチンはその値ではなく変数そのものを捕捉するからです; 従って、将来の変数への変更はサブルーチンの返り値に反映されます。

If you intended for the subroutine to be eligible for inlining, then make sure the variable is not referenced elsewhere, possibly by copying it:

サブルーチンをインライン化可能にすることを意図している場合は、 おそらくコピーすることによって、変数がどこからも 参照されていないようにしてください:

    my $var2 = $var;
    $sub = sub () { $var2 };

If you do want this subroutine to be a closure that reflects future changes to the variable that it closes over, add an explicit return:

このサブルーチンを、閉じた変数の将来の変更を反映するクロージャにしたい場合は、 明示的な return を追加してください:

    my $var;
    $sub = sub () { return $var };

This usage has been deprecated, and will no longer be allowed in Perl 5.32.

この使用法は廃止予定で、Perl 5.32 以降は許されません。

Use of strings with code points over 0xFF as arguments to vec

(vec の引数として 0xFF を超える符号位置の文字列の使用)

vec views its string argument as a sequence of bits. A string containing a code point over 0xFF is nonsensical. This usage is deprecated in Perl 5.28, and will be removed in Perl 5.32.

vec はその文字列引数をビット列として見ます。 0xFF を超える符号位置を含む文字列は意味がありません。 この使用法は Perl 5.28 で廃止予定になり、 Perl 5.32 で削除される予定です。

0xFF を超える符号位置に対する文字列ビット単位演算子の使用

The string bitwise operators, &, |, ^, and ~, treat their operands as strings of bytes. As such, values above 0xFF are nonsensical. Some instances of these have been deprecated since Perl 5.24, and were made fatal in 5.28, but it turns out that in cases where the wide characters did not affect the end result, no deprecation notice was raised, and so remain legal. Now, all occurrences either are fatal or raise a deprecation warning, so that the remaining legal occurrences will be fatal in 5.32.

ビット単位文字列演算子 &, |, ^, ~ は、そのオペランドを バイトの文字列として扱います。 従って0xFF を超える値は意味がありません。 これらの恥部は Perl 5.24 から廃止予定で、5.28 で致命的エラーになりましたが、 ワイド文字が最終結果に影響を与えない場合、 廃止予定警告は出力されず、従って正当なまま残っていることが分かりました。 今回、こえらの全ては致命的エラーか廃止予定警告が出るようになり、 残っている正当な場合は 5.32 で致命的エラーになる予定です。

An example of this is

この例は:

 "" & "\x{100}"

The wide character is not used in the & operation because the left operand is shorter. This now warns anyway.

ワイド文字は & 演算では使われません; 左オペランドはより短いからです。 どちらにしろこれは警告されるようになりました。

hostname() は引数を取りません

The function hostname() in the Sys::Hostname module has always been documented to be called with no arguments. Historically it has not enforced this, and has actually accepted and ignored any arguments. As a result, some users have got the mistaken impression that an argument does something useful. To avoid these bugs, the function is being made strict. Passing arguments was deprecated in Perl 5.28, and will become fatal in Perl 5.32.

Sys::Hostname モジュールの hostname() 関数は、 引数なしで呼び出されると常に文書化されていました。 歴史的にはこれは強制されておらず、実際に引数を受け付けて、 全て無視していました。 結果として、引数が何か有用であるという間違った印象を 一部のユーザーに与えていました。 これらのバグを避けるために、この関数はより厳密になりました。 引数を渡すのは Perl 5.28 で廃止予定になり、 Perl 5.32 で致命的エラーになる予定です。

正規表現中のエスケープされない左中かっこ

The simple rule to remember, if you want to match a literal { character (U+007B LEFT CURLY BRACKET) in a regular expression pattern, is to escape each literal instance of it in some way. Generally easiest is to precede it with a backslash, like \{ or enclose it in square brackets ([{]). If the pattern delimiters are also braces, any matching right brace (}) should also be escaped to avoid confusing the parser, for example,

正規表現パターン中でリテラルな { 文字 (U+007B LEFT CURLY BRACKET) にマッチングしたい場合、 覚えるべき単純な規則は、何らかの形でそれぞれのリテラルな実体を エスケープすることです。 一般的に最も簡単な方法は、\{ のように逆スラッシュを前置するか、 大かっこで囲む ([{]) ことです。 パターン区切り文字も中かっこなら、例えばパーサの混乱を避けるために、 マッチングする右中かっこ (}) もエスケープするべきです。

 qr{abc\{def\}ghi}

Forcing literal { characters to be escaped will enable the Perl language to be extended in various ways in future releases. To avoid needlessly breaking existing code, the restriction is is not enforced in contexts where there are unlikely to ever be extensions that could conflict with the use there of { as a literal. A non-deprecation warning that the left brace is being taken literally is raised in contexts where there could be confusion about it.

リテラルな { 文字のエスケープの強制は、 Perl 言語が将来のリリースで様々な方法で拡張できるようにするためにします。 既存のコードを不必要に壊すのを避けるために、この制限は、 { をリテラルとして使うことと衝突する拡張がなさそうな部分では 強制されません。 左中かっこがリテラルに取られているときの非廃止予定警告は、 それが混乱するかも知れない文脈で発生します。

Literal uses of { were deprecated in Perl 5.20, and some uses of it started to give deprecation warnings since. These cases were made fatal in Perl 5.26. Due to an oversight, not all cases of a use of a literal { got a deprecation warning. Some cases started warning in Perl 5.26, and were made fatal in Perl 5.30. Other cases started in Perl 5.28, and will be made fatal in 5.32.

{ のリテラルな使用は Perl 5.20 に廃止予定になり、 一部の使用についてはその時から廃止予定警告が出始めています。 これらの場合は Perl 5.26 で致命的エラーになりました。 見過ごしにより、全てのリテラルな { の使用に対して廃止予定警告を 出していませんでした。 一部の場合は Perl 5.26 で警告を始め、Perl 5.30 で致命的エラーになりました。 その他の場合は Perl 5.28 で始め、5.32 で致命的エラーになる予定です。

XS コードで、UTF-8 を扱う様々なマクロの使用

These macros will require an extra parameter in Perl 5.32: isALPHANUMERIC_utf8, isASCII_utf8, isBLANK_utf8, isCNTRL_utf8, isDIGIT_utf8, isIDFIRST_utf8, isPSXSPC_utf8, isSPACE_utf8, isVERTWS_utf8, isWORDCHAR_utf8, isXDIGIT_utf8, isALPHANUMERIC_LC_utf8, isALPHA_LC_utf8, isASCII_LC_utf8, isBLANK_LC_utf8, isCNTRL_LC_utf8, isDIGIT_LC_utf8, isGRAPH_LC_utf8, isIDCONT_LC_utf8, isIDFIRST_LC_utf8, isLOWER_LC_utf8, isPRINT_LC_utf8, isPSXSPC_LC_utf8, isPUNCT_LC_utf8, isSPACE_LC_utf8, isUPPER_LC_utf8, isWORDCHAR_LC_utf8, isXDIGIT_LC_utf8, toFOLD_utf8, toLOWER_utf8, toTITLE_utf8, and toUPPER_utf8.

これらのマクロは Perl 5.32 で追加の引数が必要になります: isALPHANUMERIC_utf8, isASCII_utf8, isBLANK_utf8, isCNTRL_utf8, isDIGIT_utf8, isIDFIRST_utf8, isPSXSPC_utf8, isSPACE_utf8, isVERTWS_utf8, isWORDCHAR_utf8, isXDIGIT_utf8, isALPHANUMERIC_LC_utf8, isALPHA_LC_utf8, isASCII_LC_utf8, isBLANK_LC_utf8, isCNTRL_LC_utf8, isDIGIT_LC_utf8, isGRAPH_LC_utf8, isIDCONT_LC_utf8, isIDFIRST_LC_utf8, isLOWER_LC_utf8, isPRINT_LC_utf8, isPSXSPC_LC_utf8, isPUNCT_LC_utf8, isSPACE_LC_utf8, isUPPER_LC_utf8, isWORDCHAR_LC_utf8, isXDIGIT_LC_utf8, toFOLD_utf8, toLOWER_utf8, toTITLE_utf8, toUPPER_utf8.

There is now a macro that corresponds to each one of these, simply by appending _safe to the name. It takes the extra parameter. For example, isDIGIT_utf8_safe corresponds to isDIGIT_utf8, but takes the extra parameter, and its use doesn't generate a deprecation warning. All are documented in "Character case changing" in perlapi and "Character classification" in perlapi.

これらのそれぞれに対応する、単に名前に _safe を追加したマクロがあります。 これは追加の引数を取ります。 例えば、isDIGIT_utf8_safeisDIGIT_utf8 に対応しますが、 これは追加の引数を取り、これを使っても廃止予定警告は生成されません。 これら全ては "Character case changing" in perlapi"Character classification" in perlapi に文書化されています。

You can change to use these versions at any time, or, if you can live with the deprecation messages, wait until 5.32 and add the parameter to the existing calls, without changing the names.

これらのバージョンをすぐに使うこともできますし、 廃止予定メッセージと共に生きることができるなら、 5.32 まで待って、名前を変更することなく既存の呼び出しに引数を 追加することもできます。

This change was originally scheduled for 5.30, but was delayed.

この変更は本来 5.30 に計画されていましたが、延期されました。

Perl 5.30

$* is no longer supported

($* はもはや対応しません)

Before Perl 5.10, setting $* to a true value globally enabled multi-line matching within a string. This relique from the past lost its special meaning in 5.10. Use of this variable will be a fatal error in Perl 5.30, freeing the variable up for a future special meaning.

Perl 5.10 より前では、$* に真の値を設定すると、 一つの文字列中の複数行マッチングをグローバルに有効にします。 この過去からの遺物は 5.10 で特別な意味を失いました。 将来の特別な意味のために変数を空けるために、 この変数の使用は Perl 5.30 で致命的エラーになります。

To enable multiline matching one should use the /m regexp modifier (possibly in combination with /s). This can be set on a per match bases, or can be enabled per lexical scope (including a whole file) with use re '/m'.

複数行マッチングを有効にするためには、 (おそらく /s と組み合わせて) /m 正規表現修飾子を使うべきです。 これはマッチング毎で設定したり、use re '/m' で (ファイル全体を含む) レキシカルスコープ毎に設定したり出来ます。

$# is no longer supported

($# はもはや対応しません)

This variable used to have a special meaning -- it could be used to control how numbers were formatted when printed. This seldom used functionality was removed in Perl 5.10. In order to free up the variable for a future special meaning, its use will be a fatal error in Perl 5.30.

この変数は特別な意味を持っていました -- print したときにいくつフォーマットするかを制御するために使われていました。 このほとんど使われない機能は Perl 5.10 で削除されました。 将来の特別な意味のために変数を空けるために、 この使用は Perl 5.30 で致命的エラーになります。

To specify how numbers are formatted when printed, one is advised to use printf or sprintf instead.

print したときにいくつフォーマットされるかを指定するには、 代わりに printfsprintf を使うことを勧めます。

Assigning non-zero to $[ is fatal

($[ への非 0 の代入は致命的エラーになります)

This variable (and the corresponding array_base feature and arybase module) allowed changing the base for array and string indexing operations.

この変数 (および対応する array_base 機能と arybase モジュール) は 配列と文字列の添え字操作の底を変更することができました。

Setting this to a non-zero value has been deprecated since Perl 5.12 and throws a fatal error as of Perl 5.30.

これに非 0 の値を設定するのは Perl 5.12 から廃止予定になり、 Perl 5.30 から致命的エラーを投げます。

File::Glob::glob() will disappear

(File::Glob::glob() は消滅します)

File::Glob has a function called glob, which just calls bsd_glob. However, its prototype is different from the prototype of CORE::glob, and hence, File::Glob::glob should not be used.

File::Glob には glob という関数があり、 これは単に bsd_glob を呼び出します。 しかし、そのプロトタイプは CORE::glob と異なっているので、 File::Glob::glob は使うべきではありません。

File::Glob::glob() was deprecated in Perl 5.8. A deprecation message was issued from Perl 5.26 onwards, and the function will disappear in Perl 5.30.

File::Glob::glob() は Perl 5.8 で廃止予定になりました。 廃止予定メッセージは Perl 5.26 から出力されるようになり、 この関数は Perl 5.30 で消滅します。

Code using File::Glob::glob() should call File::Glob::bsd_glob() instead.

File::Glob::glob() を使っているコードは代わりに File::Glob::bsd_glob() を呼び出すべきです。

正規表現中のエスケープされない左中かっこ(5.30 版)

前述の "Unescaped left braces in regular expressions" を 参照してください。

Unqualified dump()

(修飾されない dump())

Use of dump() instead of CORE::dump() was deprecated in Perl 5.8, and an unqualified dump() will no longer be available in Perl 5.30.

CORE::dump() の代わりの dump() の使用は Perl 5.8 で廃止予定になり、 修飾されない dump() は Perl 5.30 で利用できなくなります。

"dump" in perlfunc を参照してください。

偽の条件で my() を使う

There has been a long-standing bug in Perl that causes a lexical variable not to be cleared at scope exit when its declaration includes a false conditional. Some people have exploited this bug to achieve a kind of static variable. Since we intend to fix this bug, we don't want people relying on this behavior.

Perl には、宣言が偽の条件を含んでいる場合、スコープを出るときに レキシカル変数がクリアされないという長年のバグがあります。 一部の人々はある種の静的変数を達成するためにこのバグを悪用していました。 私たちはこのバグを修正したいので、私たちは人々がこの振る舞いに 依存してほしくありません。

Instead, it's recommended one uses state variables to achieve the same effect:

代わりに、同じ効果を達成するために state 変数を使うことを勧めます:

    use 5.10.0;
    sub count {state $counter; return ++ $counter}
    say count ();    # Prints 1
    say count ();    # Prints 2

state variables were introduced in Perl 5.10.

state 変数は Perl 5.10 で導入されました。

Alternatively, you can achieve a similar static effect by declaring the variable in a separate block outside the function, eg

あるいは、関数の外側の別のブロックの中で変数を宣言することで 似たような静的な効果を得られます:

    sub f { my $x if 0; return $x++ }

becomes

これは次のようになります:

    { my $x; sub f { return $x++ } }

The use of my() in a false conditional has been deprecated in Perl 5.10, and it will become a fatal error in Perl 5.30.

偽の条件での my() の使用は Perl 5.10 で廃止予定になり、 Perl 5.30 で致命的エラーになります。

:utf8 ハンドルに対するバイト読み書き

The sysread(), recv(), syswrite() and send() operators are deprecated on handles that have the :utf8 layer, either explicitly, or implicitly, eg., with the :encoding(UTF-16LE) layer.

(明示的あるいは :encoding(UTF-16LE) 層のように暗黙的どちらでも) :utf8 層を持つハンドルに対する sysread(), recv(), syswrite(), send() 演算子は廃止予定です。

Both sysread() and recv() currently use only the :utf8 flag for the stream, ignoring the actual layers. Since sysread() and recv() do no UTF-8 validation they can end up creating invalidly encoded scalars.

sysread() と recv() の両方は今のところ :utf8 フラグを ストリームのためだけに使い、実際の層は無視します。 sysread() と recv() は UTF-8 検証を行わないので、 不正にエンコードされたスカラを作ることになるかも知れません。

Similarly, syswrite() and send() use only the :utf8 flag, otherwise ignoring any layers. If the flag is set, both write the value UTF-8 encoded, even if the layer is some different encoding, such as the example above.

同様に、syswrite() と send() は :utf8 フラグのみを使い、 その他の層は無視します。 フラグが設定されていると、これらは、たとえ層が前述の例のように 異なったエンコーディングの場合でも、UTF-8 エンコードされた値を書き込みます。

Ideally, all of these operators would completely ignore the :utf8 state, working only with bytes, but this would result in silently breaking existing code. To avoid this a future version of perl will throw an exception when any of sysread(), recv(), syswrite() or send() are called on handle with the :utf8 layer.

理想的には、これらの演算子全ては完全に :utf8 の状態を無視して、 バイトに対してのみ動作したいですが、 これは既存のコードを暗黙に壊すことになります。 これを避けるために、将来のバージョンの Perl では sysread(), recv(), syswrite(), send() が :utf8 層を持った ハンドルで呼び出されると例外を投げる予定です。

In Perl 5.30, it will no longer be possible to use sysread(), recv(), syswrite() or send() to read or send bytes from/to :utf8 handles.

Perl 5.30 で、:utf8 ハンドルでバイトを読み書きするために sysread(), recv(), syswrite(), send() を使うことはできなくなります。

区切り文字として未割当符号位置や非独立書記素の使用

A grapheme is what appears to a native-speaker of a language to be a character. In Unicode (and hence Perl) a grapheme may actually be several adjacent characters that together form a complete grapheme. For example, there can be a base character, like "R" and an accent, like a circumflex "^", that appear to be a single character when displayed, with the circumflex hovering over the "R".

書記素は、言語のネイティブスピーカーにとって文字のように見えるものです。 Unicode (従って Perl) では、 書記素は実際には互いに完全な書記素を形成するいくつかの隣接する 文字かもしれません。 例えば、"R" のような基底文字と曲折アクセント "^" のような アクセントかもしれません; これは表示されるときには "R" の上に曲折アクセントがある単一の文字となります。

As of Perl 5.30, use of delimiters which are non-standalone graphemes is fatal, in order to move the language to be able to accept multi-character graphemes as delimiters.

Perl 5.30 から、非独立書記素の区切り文字としての使用は致命的エラーです; これは複数文字書記素を区切り文字として受け入れられるように言語を 動かすためです。

Also, as of Perl 5.30, delimiters which are unassigned code points but that may someday become assigned are prohibited. Otherwise, code that works today would fail to compile if the currently unassigned delimiter ends up being something that isn't a stand-alone grapheme. Because Unicode is never going to assign non-character code points, nor code points that are above the legal Unicode maximum, those can be delimiters.

また、Perl 5.30 から、いつか割り当てられるかも知れない 非割り当て符号位置の区切り文字も禁止されます。 さもなければ、もし現在割り当てられていない書記素が単体の書記素でないものに なった場合、今日動作しているコードがコンパイルに失敗することになります。 Unicode は決して 非文字符号位置正当な Unicode の最大値より大きな符号位置 を割り当てないので、 これらは区切り文字になることができます。

Perl 5.28

Attributes :locked and :unique

(属性 :locked:unique)

The attributes :locked (on code references) and :unique (on array, hash and scalar references) have had no effect since Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated since.

属性 (コードリファレンスに対する) :locked および (配列、ハッシュ、スカラリファレンスに対する) :unique は それぞれ Perl Perl 5.005 と Perl 5.8.8 から何もしなくなっていました。 これらの使用はその時から廃止予定でした。

As of Perl 5.28, these attributes are syntax errors. Since the attributes do not do anything, removing them from your code fixes the syntax error; and removing them will not influence the behaviour of your code.

Perl 5.28 から、これらの属性は文法エラーとなります。 これらの属性は何もしないので、コードからこれらを削除すれば 文法エラーを修正でき、削除することによってコードの振る舞いには 影響ありません。

空のヒヤドキュメント終端子

Perl has allowed you to use a bare here-document terminator to have the here-document end at the first empty line. This practise was deprecated in Perl 5.000; as of Perl 5.28, using a bare here-document terminator throws a fatal error.

Perl は、最初の空行をヒヤドキュメントの末尾とするために空の ヒヤドキュメント終端子を使うことを許していました。 この監修は Perl 5.000 で廃止予定になりました; Perl 5.28 から、裸のヒヤドキュメント終端子の使用は 致命的エラーを投げます。

You are encouraged to use the explicitly quoted form if you wish to use an empty line as the terminator of the here-document:

ヒヤドキュメントの終端子として空行を使いたい場合は、 明示的にクォートした形式を使うことが推奨されます:

  print <<"";
    Print this line.

  # Previous blank line ends the here-document.

$/ に非正整数へのリファレンスを設定

You assigned a reference to a scalar to $/ where the referenced item is not a positive integer. In older perls this appeared to work the same as setting it to undef but was in fact internally different, less efficient and with very bad luck could have resulted in your file being split by a stringified form of the reference.

リファレンスが差しているのが非正整数のときにそのリファレンスを $/ に代入しました。 より古い Perl では、これは undef を設定するのと同じ ように見えます が、実際内部では異なり、 より効率が悪く、とても運が悪いとファイルがリファレンスの文字列化形式で 分割されることになります。

In Perl 5.20.0 this was changed so that it would be exactly the same as setting $/ to undef, with the exception that this warning would be thrown.

Perl 5.20.0 では、これは例外が投げられることを除けば、 正確に $/ に undef を設定するのと同じです。

As of Perl 5.28, setting $/ to a reference of a non-positive integer throws a fatal error.

Perl 5.28 から、$/ に非正整数へのリファレンスを設定すると 致命的エラーを投げます。

You are recommended to change your code to set $/ to undef explicitly if you wish to slurp the file.

ファイルを吸い込みたい場合、明示的に $/undef を設定するように コードを変更することを薦めます。

Unicode 符号位置の値の制限

Unicode only allows code points up to 0x10FFFF, but Perl allows much larger ones. Up till Perl 5.28, it was allowed to use code points exceeding the maximum value of an integer (IV_MAX). However, that did break the perl interpreter in some constructs, including causing it to hang in a few cases. The known problem areas were in tr///, regular expression pattern matching using quantifiers, as quote delimiters in qX...X (where X is the chr() of a large code point), and as the upper limits in loops.

Unicode は 0x10FFFF までの符号位置だけを許していますが、 Perl はもっと大きなものも許しています。 Perl 5.28 まで、整数の最大値 (IV_MAX) を超える符号位置を許していました。 しかし、これは一部の構文でperl インタプリタを壊すことがあり、 一部の場合はハングアップを引き起こします。 問題があることが知られている分野は tr///、量指定子を使った正規表現パターンマッチング qX...X の中でのクォート区切り文字 (X は大きな符号位置の chr())、ループの上限でした。

The use of out of range code points was deprecated in Perl 5.24; as of Perl 5.28 using a code point exceeding IV_MAX throws a fatal error.

範囲外の符号位置の使用は Perl 5.24 で廃止予定になりました; Perl 5.28 から、IV_MAX を超える符号位置の使用は致命的エラーを投げます。

If your code is to run on various platforms, keep in mind that the upper limit depends on the platform. It is much larger on 64-bit word sizes than 32-bit ones. For 32-bit integers, IV_MAX equals 0x7FFFFFFF, for 64-bit integers, IV_MAX equals 0x7FFFFFFFFFFFFFFF.

あなたのコードを様々なプラットフォームで実行するためには、 上限はプラットフォームに依存することを覚えておいてください。 これは 64 ビットワードサイズでは 32 ビットのものより遙かに大きいです。 32 ビット整数では IV_MAX0x7FFFFFFF で、 64 ビット整数では IV_MAX0x7FFFFFFFFFFFFFFF です。

フォーマットでのカンマなしの変数リストの使用

It was allowed to use a list of variables in a format, without separating them with commas. This usage has been deprecated for a long time, and as of Perl 5.28, this throws a fatal error.

フォーマットで、分割するカンマなしの変数のリストを使うことが 許されていました。 この使用法は長い間廃止予定で、Perl 5.28 からこれは致命的エラーを投げます。

Use of \N{}

(\N{} の使用)

Use of \N{} with nothing between the braces was deprecated in Perl 5.24, and throws a fatal error as of Perl 5.28.

中かっこの中に何もない \N{} の使用は Perl 5.24 で廃止予定になり、 Perl 5.28 から致命的エラーを投げます。

Since such a construct is equivalent to using an empty string, you are recommended to remove such \N{} constructs.

このような構文は空文字列を使うのと等価なので、 このような \N{} 構文を削除することを勧めます。

ファイルハンドルとディレクトリハンドルで同じシンボルを使う

It used to be legal to use open() to associate both a filehandle and a dirhandle to the same symbol (glob or scalar). This idiom is likely to be confusing, and it was deprecated in Perl 5.10.

ファイルハンドルとディレクトリハンドルに同じシンボル (グロブまたはスカラ) を代入するのに open() を使うのは、 以前は正当でした。 この慣用句は混乱を起こしやすく、Perl 5.10 で廃止予定になりました。

Using the same symbol to open() a filehandle and a dirhandle throws a fatal error as of Perl 5.28.

ファイルハンドルとディレクトリハンドルを open() するのに 同じシンボルを使うのは Perl 5.28 から致命的エラーを投げます。

You should be using two different symbols instead.

代わりに二つの異なったシンボルを使うようにしてください。

${^ENCODING} はもはや対応しません

The special variable ${^ENCODING} was used to implement the encoding pragma. Setting this variable to anything other than undef was deprecated in Perl 5.22. Full deprecation of the variable happened in Perl 5.25.3.

特殊変数 ${^ENCODING}encoding プラグマを実装するために 使われていました。 この変数を undef 以外の値に設定するのは Perl 5.22 で廃止予定になりました。 この変数の完全な廃止予定は Perl 5.25.3 で起こりました。

Setting this variable to anything other than an undefined value throws a fatal error as of Perl 5.28.

この変数に未定義値以外のものを設定するのは Perl 5.28 から致命的エラーを投げます。

B::OP::terse

This method, which just calls B::Concise::b_terse, has been deprecated, and disappeared in Perl 5.28. Please use B::Concise instead.

単に B::Concise::b_terse を呼び出すこのメソッドは廃止予定で、 Perl 5.28 で消滅しました。 代わりに B::Concise を使ってください。

非メソッド %s() のための継承された AUTOLOAD はもはや許されません

As an (ahem) accidental feature, AUTOLOAD subroutines were looked up as methods (using the @ISA hierarchy) even when the subroutines to be autoloaded were called as plain functions (e.g. Foo::bar()), not as methods (e.g. Foo->bar() or $obj->bar()).

ある (ゴホン) 偶発的な機能として、AUTOLOAD サブルーチンは、 たとえ autoload されるサブルーチンが (Foo->bar()$obj->bar() のように)メソッドとしてではなく (Foo::bar() のように)普通の関数として呼び出されても、 (@ISA 階層を使って) メソッドして検索されていました。

This bug was deprecated in Perl 5.004, has been rectified in Perl 5.28 by using method lookup only for methods' AUTOLOADs.

このバグは Perl 5.004 で廃止予定になり、 Perl 5.28 でメソッドの AUTOLOAD のみでメソッド検索するように 修正されました。

The simple rule is: Inheritance will not work when autoloading non-methods. The simple fix for old code is: In any module that used to depend on inheriting AUTOLOAD for non-methods from a base class named BaseClass, execute *AUTOLOAD = \&BaseClass::AUTOLOAD during startup.

単純な規則は: 継承は非メソッドを autoload された時には動作しません。 古いコードのための簡単な修正方法は: BaseClass という名前のベースクラスから非メソッドの AUTOLOAD を継承することに依存しているそれぞれのモジュールで、 起動時に *AUTOLOAD = \&BaseClass::AUTOLOAD を実行します。

In code that currently says use AutoLoader; @ISA = qw(AutoLoader); you should remove AutoLoader from @ISA and change use AutoLoader; to use AutoLoader 'AUTOLOAD';.

現在 use AutoLoader; @ISA = qw(AutoLoader); としているコードは、 @ISA から AutoLoader を削除して、 use AutoLoader;use AutoLoader 'AUTOLOAD'; に変更するべきです。

0xFF を超える符号位置に対する文字列ビット単位演算子の使用

The string bitwise operators, &, |, ^, and ~, treat their operands as strings of bytes. As such, values above 0xFF are nonsensical. Using such code points with these operators was deprecated in Perl 5.24, and is fatal as of Perl 5.28.

文字列ビット単位演算子 &, |, ^, ~ は そのオペランドをバイト文字列として扱います。 従って、0xFF を超える値は意味がありません。 これらの演算子を使ったこのような符号位置の使用は Perl 5.24 で廃止予定になり、Perl 5.28 で致命的エラーになりました。

In XS code, use of to_utf8_case()

(XS コード内での to_utf8_case() の使用)

This function has been removed as of Perl 5.28; instead convert to call the appropriate one of: toFOLD_utf8_safe. toLOWER_utf8_safe, toTITLE_utf8_safe, or toUPPER_utf8_safe.

この関数は Perl 5.28 で削除されました; 代わりに以下のうち適切なものを呼び出すように変換してください: toFOLD_utf8_safe. toLOWER_utf8_safe, toTITLE_utf8_safe, toUPPER_utf8_safe.

Perl 5.26

--libpods in Pod::Html

(Pod::Html での --libpods)

Since Perl 5.18, the option --libpods has been deprecated, and using this option did not do anything other than producing a warning.

Perl 5.18 から、--libpods は廃止予定で、 このオプションは警告を出力する以外に何もしていませんでした。

The --libpods option is no longer recognized as of Perl 5.26.

--libpods オプションは Perl 5.26 からはや認識しなくなりました。

The utilities c2ph and pstruct

(ユーティリティ c2phpstruct)

These old, perl3-era utilities have been deprecated in favour of h2xs for a long time. As of Perl 5.26, they have been removed.

これらの古い、perl3 時代のユーティリティは、h2xs に置き換えられて 長い間廃止予定でした。 Perl 5.26 から、これらは削除されました。

Trapping $SIG {__DIE__} other than during program exit.

(プログラム終了中以外での $SIG {__DIE__} のトラップ)

The $SIG{__DIE__} hook is called even inside an eval(). It was never intended to happen this way, but an implementation glitch made this possible. This used to be deprecated, as it allowed strange action at a distance like rewriting a pending exception in $@. Plans to rectify this have been scrapped, as users found that rewriting a pending exception is actually a useful feature, and not a bug.

$SIG{__DIE__} フックは eval() の内側でも呼び出されます。 これが起きることは決して意図されていませんでしたが、 実装上の問題によりこれが可能になっていました。 これは廃止予定にされていました; なぜなら $@ の中の保留されている例外を書き換えるというような、 離れた場所でおかしな動作が可能になるからです。 これを修正する計画は却下されました; ユーザーが、保留している計画を書き換えるのは実際には有用な機能で バグではないと発見したからです。

Perl never issued a deprecation warning for this; the deprecation was by documentation policy only. But this deprecation has been lifted as of Perl 5.26.

Perl はこれに関する廃止予定警告を出したことはありません; 廃止予定は文書分署ポリシーによるものだけです。 しかし廃止予定は Perl 5.26 で実行されました。

"%s" での不正な UTF-8 文字列

This message indicates a bug either in the Perl core or in XS code. Such code was trying to find out if a character, allegedly stored internally encoded as UTF-8, was of a given type, such as being punctuation or a digit. But the character was not encoded in legal UTF-8. The %s is replaced by a string that can be used by knowledgeable people to determine what the type being checked against was.

このメッセージは、Perl コアまたは XS コードのバグを示しています。 このようなコードは、内部で UTF-8 でエンコードされて保管されたと されている文字が、句読点や数字のような特定の種類かどうかを 調べようとしています。 しかしこの文字は正当な UTF-8 でエンコードされていません。 %s は、知識のある人々がどのような種類をチェックしようとしたかを 決定するのに使われる文字列で置き換えられます。

Passing malformed strings was deprecated in Perl 5.18, and became fatal in Perl 5.26.

不正な文字列を渡すのは Perl 5.18 で廃止予定になり、 Perl 5.26 で致命的エラーになりました。

Perl 5.24

Use of *glob{FILEHANDLE}

(*glob{FILEHANDLE} の使用)

The use of *glob{FILEHANDLE} was deprecated in Perl 5.8. The intention was to use *glob{IO} instead, for which *glob{FILEHANDLE} is an alias.

*glob{FILEHANDLE} の使用は Perl 5.8 で廃止予定になりました。 その意図は、*glob{FILEHANDLE} が別名である *glob{IO} を代わりに使うことでした。

However, this feature was undeprecated in Perl 5.24.

しかし、この機能は Perl 5.24 で廃止予定でなくなりました。

POSIX::%s() の呼び出しは廃止予定です

The following functions in the POSIX module are no longer available: isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, and isxdigit. The functions are buggy and don't work on UTF-8 encoded strings. See their entries in POSIX for more information.

POSIX モジュールの以下の関数はもはや利用できません: isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit。 これらの関数はバグっぽく、UTF-8 エンコードされた文字列で動作しません。 さらなる情報については POSIX のそれぞれの項目を参照してください。

The functions were deprecated in Perl 5.20, and removed in Perl 5.24.

これらの関数は Perl 5.20 で廃止予定になり、Perl 5.24 で削除されました。

Perl 5.16

* なしでのハンドルでの %s は廃止予定です

It used to be possible to use tie, tied or untie on a scalar while the scalar holds a typeglob. This caused its filehandle to be tied. It left no way to tie the scalar itself when it held a typeglob, and no way to untie a scalar that had had a typeglob assigned to it.

スカラが型グロブを保持しているときにスカラに対して tie, tied, untie を使うことが可能でした。 これはそのファイルハンドルが tie されていました。 型グロブを保持しているときにスカラ自身を tie したり、 型グロブが代入されているスカラを untie する方法はありませんでした。

This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16.

これは Perl 5.14 で廃止予定になり、バグは Perl 5.16 で修正されました。

So now tie $scalar will always tie the scalar, not the handle it holds. To tie the handle, use tie *$scalar (with an explicit asterisk). The same applies to tied *$scalar and untie *$scalar.

今では tie $scalar は保持しているハンドルではなく、常にスカラを tie します。 ハンドルを tie するためには、(明示的なアスタリスク付きの) tie *$scalar を使ってください。 同じことは tied *$scalaruntie *$scalar にも適用されます。

SEE ALSO

warnings, diagnostics.