=encoding euc-jp =head1 NAME =begin original perldelta - what is new for perl v5.26.0 =end original perl5260delta - perl v5.26.0 での変更点 =head1 DESCRIPTION =begin original This document describes the differences between the 5.24.0 release and the 5.26.0 release. =end original この文書は 5.24.0 リリースと 5.26.0 リリースの変更点を記述しています。 =head1 Notice (注意) =begin original This release includes three updates with widespread effects: =end original このリリースには広範囲に影響を与える三つの更新を含んでいます: =over 4 =item * C<"."> no longer in C<@INC> (C<"."> はもはや C<@INC> に含まれません) =begin original For security reasons, the current directory (C<".">) is no longer included by default at the end of the module search path (C<@INC>). This may have widespread implications for the building, testing and installing of modules, and for the execution of scripts. See the section L<< Removal of the current directory (C<".">) from C<@INC> >> for the full details. =end original セキュリティ上の理由により、カレントディレクトリ (C<".">) はもはや デフォルトでモジュール検索パス (C<@INC>) の末尾に含まれなくなりました。 これはモジュールのビルド、テスト、インストールと、スクリプトの実行に 広範囲に関連するかもしれません。 完全な詳細については L<< Removal of the current directory (C<".">) from C<@INC> >> の章を 参照してください。 =item * C may now warn (C は警告を出すことがあるようになりました) =begin original C now gives a deprecation warning when it fails to load a file which it would have loaded had C<"."> been in C<@INC>. =end original C は、C<@INC> に C<"."> があったときに読み込めていたファイルの読み込みに 失敗したときに廃止予定警告を出すようになりました。 =item * In regular expression patterns, a literal left brace C<"{"> should be escaped (正規表現中では、リテラルな左中かっこ C<"{"> はエスケープする必要があります) =begin original See L characters in regular expression patterns are no longer permissible>. =end original L characters in regular expression patterns are no longer permissible> を 参照してください。 =back =head1 Core Enhancements (コアの拡張) =head2 Lexical subroutines are no longer experimental (レキシカルサブルーチンはもはや実験的ではなくなりました) =begin original Using the C feature introduced in v5.18 no longer emits a warning. Existing code that disables the C warning category that the feature previously used will continue to work. The C feature has no effect; all Perl code can use lexical subroutines, regardless of what feature declarations are in scope. =end original v5.18 で導入された C 機能はもはや警告を出さなくなりました。 以前使われていた機能の C 警告カテゴリを無効にした コードはそのまま動作します。 C 機能はなんの効果もありません; 全ての Perl コードは、 スコープ内にどの機能宣言があるかどうかに関わらず、レキシカルサブルーチンを 使えます。 =head2 Indented Here-documents (インデントされたヒヤドキュメント) =begin original This adds a new modifier C<"~"> to here-docs that tells the parser that it should look for C as the closing delimiter. =end original ヒヤドキュメントに新しい修飾子 C<"~"> が追加されました; これはパーサに、 閉じ区切り文字として C を探すように伝えるものです。 =begin original These syntaxes are all supported: =end original 以下の文法全てに対応しています: <<~EOF; <<~\EOF; <<~'EOF'; <<~"EOF"; <<~`EOF`; <<~ 'EOF'; <<~ "EOF"; <<~ `EOF`; =begin original The C<"~"> modifier will strip, from each line in the here-doc, the same whitespace that appears before the delimiter. =end original C<"~"> 修飾子は、ヒヤドキュメントの各行から区切り文字の前にあるのと同じ 空白を取り除きます。 =begin original Newlines will be copied as-is, and lines that don't include the proper beginning whitespace will cause perl to croak. =end original 改行はそのままコピーされ、行の先頭に適切な空白を含んでいない場合は perl は croak します。 =begin original For example: =end original 例えば: if (1) { print <<~EOF; Hello there EOF } =begin original prints "Hello there\n" with no leading whitespace. =end original これは先頭の空白なしで "Hello there\n" を表示します。 =head2 New regular expression modifier C (新しい正規表現修飾子 C) =begin original Specifying two C<"x"> characters to modify a regular expression pattern does everything that a single one does, but additionally TAB and SPACE characters within a bracketed character class are generally ignored and can be added to improve readability, like S>. Details are at Lx and Exx>. =end original 正規表現を修正するために二つの C<"x"> 文字を指定すると、一つ指定したときの 全ての効果に加えて、大かっこ文字クラスの中の TAB と SPACE は一般的に 無視されるようになるので、次のように可読性を改善するためにこれらを 追加できるようになります: S> 。 詳細は Lx and Exx> にあります。 =head2 C<@{^CAPTURE}>, C<%{^CAPTURE}>, and C<%{^CAPTURE_ALL}> (C<@{^CAPTURE}>, C<%{^CAPTURE}>, C<%{^CAPTURE_ALL}>) =begin original C<@{^CAPTURE}> exposes the capture buffers of the last match as an array. So C<$1> is C<${^CAPTURE}[0]>. This is a more efficient equivalent to code like C, and you don't have to keep track of the C<$matched_string> either. This variable has no single character equivalent. Note that, like the other regex magic variables, the contents of this variable is dynamic; if you wish to store it beyond the lifetime of the match you must copy it to another array. =end original C<@{^CAPTURE}> は最後のマッチングの捕捉バッファを配列として晒します。 つまり C<$1> は C<${^CAPTURE}[0]> です。 これは C のようなコードと 等価でより効果的で、どちらも C<$matched_string> を追跡する必要はありません。 この変数には一文字の等価なものはありません。 他の正規表現マジック変数と同様、この変数の内容は動的であることに 注意してください; マッチングの生存期間を超えて値を補完したい場合、 他の配列にコピーしなければなりません。 =begin original C<%{^CAPTURE}> is equivalent to C<%+> (I, named captures). Other than being more self-documenting there is no difference between the two forms. =end original C<%{^CAPTURE}> は C<%+> (I<つまり>、名前付き捕捉) と等価です。 より自己説明的であることを覗いて二つの型式に違いはありません。 =begin original C<%{^CAPTURE_ALL}> is equivalent to C<%-> (I, all named captures). Other than being more self-documenting there is no difference between the two forms. =end original C<%{^CAPTURE_ALL}> は C<%-> (I<つまり>、全ての名前付き捕捉) と等価です。 より自己説明的であることを覗いて二つの型式に違いはありません。 =head2 Declaring a reference to a variable (変数へのリファレンスの宣言) =begin original As an experimental feature, Perl now allows the referencing operator to come after L|perlfunc/my>, L|perlfunc/state>, L|perlfunc/our>, or L|perlfunc/local>. This syntax must be enabled with C. It is experimental, and will warn by default unless C is in effect. It is intended mainly for use in assignments to references. For example: =end original 実験的機能として、Perl は L|perlfunc/my>, L|perlfunc/state>, L|perlfunc/our>, L|perlfunc/local> の後にリファレンス演算子を許すようになりました。 この文法は C で有効にされなければなりません。 これは実験的で、C が有効でない限り、 デフォルトで警告が出ます。 これは主にリファレンスへの代入に使うことを意図しています。 例えば: use experimental 'refaliasing', 'declared_refs'; my \$a = \$b; =begin original See L for more details. =end original より詳しくは L を参照してください。 =head2 Unicode 9.0 is now supported (Unicode 9.0 に対応しました) =begin original A list of changes is at L. Modules that are shipped with core Perl but not maintained by p5p do not necessarily support Unicode 9.0. L does work on 9.0. =end original 変更の一覧は L にあります。 コア Perl と共に出荷されているけれども p5p によって保守されていない モジュールは必ずしも Unicode 9.0 に対応しているとは限りません。 L は 9.0 で動作します。 =head2 Use of C<\p{I