perldelta - perl v5.8.1 での変更点
perl581delta - what is new for perl v5.8.1

目次 TABLE OF CONTENTS


名前 NAME

perldelta - perl v5.8.1 での変更点 perl581delta - what is new for perl v5.8.1


説明 DESCRIPTION

このドキュメントでは 5.8.0 リリースと 5.8.1 リリースの変更点を 記述しています. This document describes differences between the 5.8.0 release and the 5.8.1 release.

もしそれよりも前のリリース, 例えば 5.6.1 等からアップデートするのなら, 5.6.0 と 5.8.0 との違いが書かれている perl58delta [CPAN] を読んでおいた方が よいでしょう. If you are upgrading from an earlier release such as 5.6.1, first read the perl58delta [CPAN], which describes differences between 5.6.0 and 5.8.0.

5.6.1 は驚くものではありません. これは開発リリースの 5.7.1 とは異なり バグ修正版です. 混乱しますか? 時間のグラフで説明するとわかりやすい かもしれません: ここにあげるのは新しいメジャーリリース及び メンテナンスリリース, 開発リリースです. In case you are wondering about 5.6.1, it was bug-fix-wise rather identical to the development release 5.7.1. Confused? This timeline hopefully helps a bit: it lists the new major releases, their maintenance releases, and the development releases.

          New     Maintenance  Development

          5.6.0                             2000-Mar-22
                               5.7.0        2000-Sep-02
                  5.6.1                     2001-Apr-08
                               5.7.1        2001-Apr-09
                               5.7.2        2001-Jul-13
                               5.7.3        2002-Mar-05
          5.8.0                             2002-Jul-18
                  5.8.1                     2003-Sep-25

非互換となる変更点 Incompatible Changes

ハッシュのランダム化 Hash Randomisation

主にセキュリティ上の理由から, ハッシュの"ランダム順序"がよりランダムに なりました. これまでは keys(), values(), each() から得られるハッシュ要素の 順序はランダムではありましたが, 繰り返しても安定でした. しかし今後は この順序は Perl の実行毎に変化します. Mainly due to security reasons, the "random ordering" of hashes has been made even more random. Previously while the order of hash elements from keys(), values(), and each() was essentially random, it was still repeatable. Now, however, the order varies between different runs of Perl.

Perl はハッシュキーの順序について保証しません. そしてその順序は Perl 5 においても数回変化しています. また, ハッシュキーの順序も挿入の順番によって常に変化していますし, 変化していくでしょう. Perl has never guaranteed any ordering of the hash keys, and the ordering has already changed several times during the lifetime of Perl 5. Also, the ordering of hash keys has always been, and continues to be, affected by the insertion order.

新しいランダム性はアプリケーションに影響を与えるでしょう. The added randomness may affect applications.

考えられるシナリオとしてはハッシュデータを含むアプリケーションからの出力 です. たとえばデータを Data::Dumper を用いて異なるファイルに出力し, そのファイルを比較してデータの変化を調べていたのなら, ダンプされたハッシュの 順序は様々であるため同一と判断されることはないでしょう. 一般的な回避策としてはキー(もしくは値で)ソートすることです. Data::Dumper においては Sortkeys オプションを使えるでしょう. 特定の順序が本当に重要であるならタイされたハッシュを使うべきでしょう. 例えば Tie::IxHash モジュールはハッシュ要素が追加された順番を保存します. One possible scenario is when output of an application has included hash data. For example, if you have used the Data::Dumper module to dump data into different files, and then compared the files to see whether the data has changed, now you will have false positives since the order in which hashes are dumped will vary. In general the cure is to sort the keys (or the values); in particular for Data::Dumper to use the Sortkeys option. If some particular order is really important, use tied hashes: for example the Tie::IxHash module which by default preserves the order in which the hash elements were added.

より微妙な問題は "グローバルデストラクション" における信頼性です. それは Perl の実行の終了時に起こります. Perl はユーザのデータを含めて全てのデータを破棄します. もしデストラクタ(DESTROY 関数)が特定の順序でグローバルデストラクションが 行われることを考えていたのならこれは頭の痛い問題でしょう. 例えばあるオブジェクトのデストラクタにおいて他のクラスのオブジェクトが まだ有効であるのかはそれへの参照をもっていないのであれば推測できません. もし環境変数 PERL_DESTRUST_LEVEL が非ゼロ値に設定されているか, 生成されたスレッドを終了しているのなら通常のリファレンスやシンボルテーブルも 既に破棄されているでしょう. クラスメソッドやクラスの通常の関数を 呼ぶこともできません. More subtle problem is reliance on the order of "global destruction". That is what happens at the end of execution: Perl destroys all data structures, including user data. If your destructors (the DESTROY subroutines) have assumed any particular ordering to the global destruction, there might be problems ahead. For example, in a destructor of one object you cannot assume that objects of any other class are still available, unless you hold a reference to them. If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero value, or if Perl is exiting a spawned thread, it will also destruct the ordinary references and the symbol tables that are no longer in use. You can't call a class method or an ordinary function on a class that has been collected that way.

ハッシュのランダム性はハッシュ要素が特定の順序であるという 隠れていた仮定や, 率直に言ってしまえばバグを暴くのは確かでしょう. Perl コアやコアモジュールにも少数ではありますが見つかりました. The hash randomisation is certain to reveal hidden assumptions about some particular ordering of hash elements, and outright bugs: it revealed a few bugs in the Perl core and core modules.

実行時にハッシュのランダム化を無効化するのなら Perl の実行前に 環境変数 PERL_HASH_SEED に 0 を設定する(詳細は perlrun 内 "PERL_HASH_SEED" [CPAN] 参照)か, もしくはコンパイル時に この機能を完全に無効化するために. -DNO_HASH_SEED (INSTALL 参照) を設定してコンパイルするかです. To disable the hash randomisation in runtime, set the environment variable PERL_HASH_SEED to 0 (zero) before running Perl (for more information see "PERL_HASH_SEED" in perlrun [CPAN]), or to disable the feature completely in compile time, compile with -DNO_HASH_SEED (see INSTALL).

この変更の背景となった根拠の原文は perlsec 内 "Algorithmic Complexity Attacks" [CPAN] を参照してください. See "Algorithmic Complexity Attacks" in perlsec [CPAN] for the original rationale behind this change.

ファイルハンドルの utf-8 フラグは locale 設定から直接影響を受けなくなりました UTF-8 On Filehandles No Longer Activated By Locale

Perl 5.8.0 では, 標準ファイルハンドルを含めた全てのファイルハンドルは, utf-8 を使うロケールが設定されているときには Unicode UTF-8 フラグを暗黙のうちに 設定していました. この機能は多くの問題を引き起こしたため廃止され, また 再設計されました: "コア機能の強化" を 参照してください. In Perl 5.8.0 all filehandles, including the standard filehandles, were implicitly set to be in Unicode UTF-8 if the locale settings indicated the use of UTF-8. This feature caused too many problems, so the feature was turned off and redesigned: see "Core Enhancements".

"=>" の前において1つの数字部分からなる v-string は文字列として扱われます Single-number v-strings are no longer v-strings before "=>"

Perl 5.6.0 から使えるバージョン文字列(v-string)機能 ("バージョン文字列" 参照)は幾分 混乱を招きました. 主にそれを使うことを意図していなかったのにもかかわらず Perl が v-string であると認識してしまうコトが要因です. 特に厄介なのは "=>" の前においてバージョン文字列 ("v" とそれに続く 数字からなります) が文字列リテラルではなく v-string として 処理されてしまうというものです. 例をあげると, The version strings or v-strings (see "Version Strings" in perldata [CPAN]) feature introduced in Perl 5.6.0 has been a source of some confusion-- especially when the user did not want to use it, but Perl thought it knew better. Especially troublesome has been the feature that before a "=>" a version string (a "v" followed by digits) has been interpreted as a v-string instead of a string literal. In other words:

	%h = ( v65 => 42 );

というコードは, Perl 5.6.0 以降では has meant since Perl 5.6.0

	%h = ( 'A' => 42 );

(少なくとも ASCII 系のプラットフォームにおいては) この様に認識されて しまいます. Perl 5.8.1 ではこれをより自然に, 次の形に認識します. (at least in platforms of ASCII progeny) Perl 5.8.1 restores the more natural interpretation

	%h = ( 'v65' => 42 );

複数の数字を持つ v-string, たとえば v65.66 や 65.66.67 は Perl 5.8 でも v-string として処理され続けるでしょう. The multi-number v-strings like v65.66 and 65.66.67 still continue to be v-strings in Perl 5.8.

(Win32) -C スイッチが再利用されました (Win32) The -C Switch Has Been Repurposed

-C スイッチが互換性のない形で変更されました. このスイッチは以前は Win32 においてかつ 5.6.x リリースでの "use utf8" において意味を持ちましたが, 5.8.0 におけるユニコード実装の 課程で意味をなさなくなりました. このスイッチを使う人はいなくなったために これは再利用されました. 5.6.x リリースでこのスイッチを有効にした時の 振る舞いは透過的に, データに依存した形で今後のリリースでもサポートされる でしょう. The -C switch has changed in an incompatible way. The old semantics of this switch only made sense in Win32 and only in the "use utf8" universe in 5.6.x releases, and do not make sense for the Unicode implementation in 5.8.0. Since this switch could not have been used by anyone, it has been repurposed. The behavior that this switch enabled in 5.6.x releases may be supported in a transparent, data-dependent fashion in a future release.

このスイッチの新しい効果については "UTF-8 ロケールでも UTF-8 は初期状態で有効になることはありません" 及び perlrun 内 "-C" [CPAN] を 参照してください. For the new life of this switch, see "UTF-8 no longer default under UTF-8 locales", and "-C" in perlrun [CPAN].

(Win32) cmd.exe の /d スイッチ (Win32) The /d Switch Of cmd.exe

Perl 5.8.1 では system(), バッククオート, 及び, 外部プログラムへのパイプ 等で内部で使用する cmd.exe シェルの実行時に /d スイッチを使います. その他のスイッチは, 外部プログラムを実行するときに通常望まれていないと 考えられるレジストリからの AutoRun コマンドの実行を無効化します. もし以前の振る舞いを維持したいのなら PERL5SHELL 環境変数に cmd /x/c と 設定して下さい. Perl 5.8.1 uses the /d switch when running the cmd.exe shell internally for system(), backticks, and when opening pipes to external programs. The extra switch disables the execution of AutoRun commands from the registry, which is generally considered undesirable when running external programs. If you wish to retain compatibility with the older behavior, set PERL5SHELL in your environment to cmd /x/c.


コア機能の強化 Core Enhancements

UTF-8 ロケールでも UTF-8 は初期状態で有効になることはありません UTF-8 no longer default under UTF-8 locales

Perl 5.8.0 から多くの Unicode 機能が展開されました. その中には便利という より厄介なものも見られました. ユーザのロケールに UTF-8 の使用が 記されていたときの, 自動的に(そして水面下で)行われるファイル ハンドルの "UTF-8-疑惑" です. 標準ファイルハンドルもその対象です. In Perl 5.8.0 many Unicode features were introduced. One of them was found to be of more nuisance than benefit: the automagic (and silent) "UTF-8-ification" of filehandles, including the standard filehandles, if the user's locale settings indicated use of UTF-8.

例えば, もしロケールに en_US.UTF-8 を指定していたのなら, STDIN 及び STDOUT は暗黙のうちに binmode(..., ":utf8") を行ったかのように自動的に "UTF-8" になります. これは出力時に, chr(0xff) を書き出したのに最終的には 0xc3 0xbf という2バイトが出力されることになります. Perl 5.8.0 のこの機能に気付いていなければ何が起こったのか理解するのは 難しいでしょう. この問題はかなり大多数の人々が気付きませんでした. 例えば RedHat リリース 8 及び 9 の デフォルトの ロケール設定は UTF-8 でした. このためそのユーザは望まなくても UTF-8 ファイルハンドルを 扱うことになりました. この痛みは Perl 5.8.0 のバグのある Unicode 実装, 特に s/// 及び tr/// に関連する辺り(このバグは 5.8.1 では修正されて います)で激化しました. For example, if you had en_US.UTF-8 as your locale, your STDIN and STDOUT were automatically "UTF-8", in other words an implicit binmode(..., ":utf8") was made. This meant that trying to print, say, chr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what you had in mind unless you were aware of this feature of Perl 5.8.0. The problem is that the vast majority of people weren't: for example in RedHat releases 8 and 9 the default locale setting is UTF-8, so all RedHat users got UTF-8 filehandles, whether they wanted it or not. The pain was intensified by the Unicode implementation of Perl 5.8.0 (still) having nasty bugs, especially related to the use of s/// and tr///. (Bugs that have been fixed in 5.8.1)

この結果, この機能は撤回され, 静かに暗黙のうちにおこなうのではなく 意識して明示的におこなう様に修正されました. 新しい Perl のコマンドラインオプション -C 及びこれに対応する環境変数 PERL_UNICODE によって I/O の様に Perl で Unicode をどのように扱うかの インターフェースとして使うことができるようになりました. 詳細については perlrun 内 "-C" [CPAN] と perlrun 内 "PERL_UNICODE" [CPAN] を参照して ください. Therefore a decision was made to backtrack the feature and change it from implicit silent default to explicit conscious option. The new Perl command line option -C and its counterpart environment variable PERL_UNICODE can now be used to control how Perl and Unicode interact at interfaces like I/O and for example the command line arguments. See "-C" in perlrun [CPAN] and "PERL_UNICODE" in perlrun [CPAN] for more information.

安全ではないシグナルを再び利用できるようになりました Unsafe signals again available

Perl 5.8.0 において "安全なシグナル" と呼ばれる機能が実装されました. これはシグナルをすぐに処理するのではなく, 安全性を向上させるために "opcode の間で" 処理するようにしたものです. それまでのシグナルハンドラのその場での処理は Perl の内部状態を破壊し, 深刻なクラッシュを引き起こすことがありました. In Perl 5.8.0 the so-called "safe signals" were introduced. This means that Perl no longer handles signals immediately but instead "between opcodes", when it is safe to do so. The earlier immediate handling easily could corrupt the internal state of Perl, resulting in mysterious crashes.

しかし新しい安全なモデルにもそれ故の問題がありました. Perl 内部命令の基本単位である opcode がその完了まで割り込まれなくなったために 時間のかかるいくつかの処理は本当に長時間にわたって実行し続けてしまいます. 例えばいくつかのネットワーク操作はそれ自身でブロッキングやタイムアウトの メカニズムを持っていますし, 状況がそろえばすぐに割り込むことができます. However, the new safer model has its problems too. Because now an opcode, a basic unit of Perl execution, is never interrupted but instead let to run to completion, certain operations that can take a long time now really do take a long time. For example, certain network operations have their own blocking and timeout mechanisms, and being able to interrupt them immediately would be nice.

これらのことから 5.8.0 より前 (正確には 5.7.3 より前) での方法で シグナルを処理するための "バックドア" を設けました. 環境変数 PERL_SIGNALS に unsafe を設定することでいままでの すぐに割り込む(しかし安全ではない)シグナル処理に戻ることができます. perlrun 内 "PERL_SIGNALS" [CPAN] 及び perlipc 内 "Deferred Signals (Safe Signals)" [CPAN] を参照してください. Therefore perl 5.8.1 introduces a "backdoor" to restore the pre-5.8.0 (pre-5.7.3, really) signal behaviour. Just set the environment variable PERL_SIGNALS to unsafe, and the old immediate (and unsafe) signal handling behaviour returns. See "PERL_SIGNALS" in perlrun [CPAN] and "Deferred Signals (Safe Signals)" in perlipc [CPAN].

完全に関係のないニュースですが, POSIX::SigAction で 安全なシグナルを使うことが出来るようになりました. POSIX 内 "POSIX::SigAction" [CPAN] を参照してください. In completely unrelated news, you can now use safe signals with POSIX::SigAction. See "POSIX::SigAction" in POSIX [CPAN].

配列のタイと負のインデックス Tied Arrays with Negative Array Indices

これまでタイを処理する配列クラスの FETCH 及び, STORE, EXISTS, DELETE メソッドに渡されるインデックスは常に非負でした. 負のインデックスが用いられたときには Perl が FETCHSIZE を暗黙のうちに 呼び出してその結果をこれらのメソッドに渡す前にインデックス値に加算して いました. この振る舞いは今後は選択できるようになりました. タイを処理する配列クラスに $NEGATIVE_INDICES というパッケージ変数があり その値が真であったときには, 負のインデックス値は変更されることなく FETCH, STORE, EXISTS, DELETE に渡されます. Formerly, the indices passed to FETCH, STORE, EXISTS, and DELETE methods in tied array class were always non-negative. If the actual argument was negative, Perl would call FETCHSIZE implicitly and add the result to the index before passing the result to the tied array method. This behaviour is now optional. If the tied array class contains a package variable named $NEGATIVE_INDICES which is set to a true value, negative values will be passed to FETCH, STORE, EXISTS, and DELETE unchanged.

local ${$x}

以下の構文 The syntaxes

	local ${$x}
	local @{$x}
	local %{$x}

によって変数のローカライズを行えるようになりました. $x には有効な変数の名前を与えてください. now do localise variables, given that the $x is a valid variable name.

ユニコード文字データベース 4.0.0 Unicode Character Database 4.0.0

Perl 5.8 に含まれる Unicode 文字データベースのコピーは 3.2.0 から 4.0.0 に更新されました. これは例えば Unicode 文字プロパティが Unicode 4.0.0 のものになったことを意味します. The copy of the Unicode Character Database included in Perl 5.8 has been updated to 4.0.0 from 3.2.0. This means for example that the Unicode character properties are as in Unicode 4.0.0.

廃止機能に対する警告 Deprecation Warnings

新しい廃止が1つあります. Perl 5.8.0 ではいくつか廃止の警告を失念していたのでここで追加しておきます. 後は将来削除される実装についての再掲です. There is one new feature deprecation. Perl 5.8.0 forgot to add some deprecation warnings, these warnings have now been added. Finally, a reminder of an impending feature removal.

(再掲) 仮想ハッシュは本当に廃止されます (Reminder) Pseudo-hashes are deprecated (really)

仮想ハッシュは Perl 5.8.0 において廃止され, Perl 5.10.0 において 削除されるでしょう. 詳細は perl58delta [CPAN] を参照してください. 仮想ハッシュへのアクセスは警告 Pseudo-hashse are deprecated を発します. もし仮想ハッシュを警告なしに本当に使い続けたいのなら次のプラグマを 使ってください: Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in Perl 5.10.0, see perl58delta [CPAN] for details. Each attempt to access pseudo-hashes will trigger the warning Pseudo-hashes are deprecated. If you really want to continue using pseudo-hashes but not to see the deprecation warnings, use:

    no warnings 'deprecated';

もしくは fields [CPAN] プラグマを使うことができますが, ハッシュ仮想化におけるデータ構造については手を触れないでください. Or you can continue to use the fields [CPAN] pragma, but please don't expect the data structures to be pseudohashes any more.

(再掲) 5.005 形式のスレッドは本当に廃止されます (Reminder) 5.005-style threads are deprecated (really)

5.005 形式のスレッド (use Thread; によって使われるもの) は Perl 5.8.0 において廃止され, Perl 5.8 より後には削除されるでしょう. 詳細は perl58delta [CPAN] を参照してください. 5.005 形式のスレッドの生成は警告 5.005 threads are deprecated を発します. もし 5.005 スレッドを警告なしに本当に使い続けたいのなら次のプラグマを 使ってください: 5.005-style threads (activated by use Thread;) were deprecated in Perl 5.8.0 and will be removed after Perl 5.8, see perl58delta [CPAN] for details. Each 5.005-style thread creation will trigger the warning 5.005 threads are deprecated. If you really want to continue using the 5.005 threads but not to see the deprecation warnings, use:

    no warnings 'deprecated';

(再掲) $* 変数は本当に廃止されます (Reminder) The $* variable is deprecated (really)

複数行のマッチを制御する $* 変数は Perl 5.8.0 において廃止され, Perl 5.8 より後には削除されるでしょう. この変数は長いこと前に廃止され, Use of $* is deprecated という警告を 発してきましたがついに削除されます. この機能はパターンマッチ時の /s 及び /m 修飾子に引き継がれています. 5.005 形式のスレッドの生成は警告 5.005 threads are deprecated を発します. もし $*変数 を警告なしに本当に使い続けたいのなら次のプラグマを 使ってください: The $* variable controlling multi-line matching has been deprecated and will be removed after 5.8. The variable has been deprecated for a long time, and a deprecation warning Use of $* is deprecated is given, now the variable will just finally be removed. The functionality has been supplanted by the /s and /m modifiers on pattern matching. If you really want to continue using the $*-variable but not to see the deprecation warnings, use:

    no warnings 'deprecated';

その他の機能 Miscellaneous Enhancements

void コンテキストでの map は高価ではなくなりました. map は現在ではそのコンテキストを理解し, void コンテキストで 呼ばれたときにはリストを構築しません. map in void context is no longer expensive. map is now context aware, and will not construct a list if called in void context.

ソケットに出力中にサーバから閉じられたときに, クライアントに SIGPIPE を受信するようになりました. この機能は予定されていませんでしたが PerlIO の変更ではなくて自然な動作からです. また不慮の自体を考慮する 為です. If a socket gets closed by the server while printing to it, the client now gets a SIGPIPE. While this new feature was not planned, it fell naturally out of PerlIO changes, and is to be considered an accidental feature.

PerlIO::get_layers(FH) はそのファイルハンドルでアクティブな PerlIO レイヤ の名前を返します. PerlIO::get_layers(FH) returns the names of the PerlIO layers active on a filehandle.

PerlIO::via レイヤはそのレイヤが "auto-:utf8" をストリームに 対して必要とするかを示す UTF8 メソッドを任意で持つことが出来ます. PerlIO::via layers can now have an optional UTF8 method to indicate whether the layer wants to "auto-:utf8" the stream.

utf8::is_utf8() がスカラーが内部で UTF-8 (Unicode) であるかを素早く 調べるために加えられました. utf8::is_utf8() has been added as a quick way to test whether a scalar is encoded internally in UTF-8 (Unicode).


モジュールとプラグマ Modules and Pragmata

更新されたモジュールとプラグマ Updated Modules And Pragmata

以下のモジュールとプラグマが Perl 5.8.0 から更新されています. The following modules and pragmata have been updated since Perl 5.8.0:

base
B::Bytecode

より使いやすい形になりました. まだ完全には遠いですが, トライしてみる 価値はあるでしょう. In much better shape than it used to be. Still far from perfect, but maybe worth a try.

B::Concise
B::Deparse
Benchmark

任意の機能, :hireswallclock, 高分解能ウォールクロックタイム (Time::HiRes の使用)を許可します. An optional feature, :hireswallclock, now allows for high resolution wall clock times (uses Time::HiRes).

ByteLoader

B::Bytecode 参照. See B::Bytecode.

bytes

bytes::substr を持つようになりました. Now has bytes::substr.

CGI
charnames

独自の文字名の別名を持つことができます. One can now have custom character name aliases.

CPAN

CPAN.pm モジュールへの簡単なコマンドラインフロントエンド cpan が追加されました. There is now a simple command line frontend to the CPAN.pm module called cpan.

Data::Dumper

新オプション, Pair, ハッシュのキーと値のセパレータを 選択できます. A new option, Pair, allows choosing the separator between hash keys and values.

DB_File
Devel::PPPort
Digest::MD5
Encode

encoding プラグマ機能(tr/// 及び DATA ファイルハンドル, format) における重要な更新. Significant updates on the encoding pragma functionality (tr/// and the DATA filehandle, formats).

ファイルハンドルがあるエンコーディングと関連づけられているのなら マッピングできない文字は入力後(壊れたデータを使った時)ではなく入力時に 検出されます. If a filehandle has been marked as to have an encoding, unmappable characters are detected already during input, not later (when the corrupted data is being used).

ISO 8859-6 変換テーブルの修正(0x30..0x39 を U+0030..U+0039 ではなく U+0660..U+0669 に間違ってマッピングしていた). GSM 03.38 変換がエスケープシーケンスを正しく扱っていなかった. UTF7 エンコーディングの追加(Unicode::Stringと機能の互換). The ISO 8859-6 conversion table has been corrected (the 0x30..0x39 erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The GSM 03.38 conversion did not handle escape sequences correctly. The UTF-7 encoding has been added (making Encode feature-complete with Unicode::String).

fields
libnet
Math::BigInt

Perl v5.8.0 に添付されていた v1.60 以来多くのバグが修正されました. 特に注目するべき点としていくつかの大きな値で除算や剰余の計算に 失敗するバグや良くない入力の処理の修正があります. A lot of bugs have been fixed since v1.60, the version included in Perl v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to fail for some large values, and the fixes to the handling of bad inputs.

いくつかの新しい機能, 例えば broot() メソッドなど, config() にパラメータを渡すことによる実行時の設定変更, NaN 及び無限大の 生成のトラップなどが追加されました. Some new features were added, e.g. the broot() method, you can now pass parameters to config() to change some settings at runtime, and it is now possible to trap the creation of NaN and infinity.

通常いくつかの最適化が行われ, math 全体をいくらか速めます. いくつかの状態では実際とても速くなります. とくに Math::BigInt::GMP の様な 代替ライブラリはこの恩恵を受けます. 加えて fsqrt() や flog() の様な とても冗長な処理はとってもすごく速くなります. As usual, some optimizations took place and made the math overall a tad faster. In some cases, quite a lot faster, actually. Especially alternative libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the quite clunky routines like fsqrt() and flog() are now much much faster.

MIME::Base64
NEXT

ダイヤモンド状継承を扱えます Diamond inheritance now works.

Net::Ping
PerlIO::scalar

文字列ではないスカラーからの読み込み (特殊な変数など, perlvar [CPAN] 参照) が機能するようになりました. Reading from non-string scalars (like the special variables, see perlvar [CPAN]) now works.

podlators
Pod::LaTeX
PodParsers
Pod::Perldoc

完全に書き直されました. その副産物として root での起動が拒否されなく なりました. Complete rewrite. As a side-effect, no longer refuses to startup when run by root.

Scalar::Util

新しいユーティリティ: refaddr, isvstring, looks_like_number, set_prototype. New utilities: refaddr, isvstring, looks_like_number, set_prototype.

Storable

コードリファレンスの格納 (B::Deparse 経由, foolproof でなく). Can now store code references (via B::Deparse, so not foolproof).

strict

strict プラグマのこれまでのバージョンでは "import" (use) 及び "unimport" (no) ルーティンに暗黙に渡されたパラメータを調べていません でした. これは次のような間違った使用方法を招きました: Earlier versions of the strict pragma did not check the parameters implicitly passed to its "import" (use) and "unimport" (no) routine. This caused the false idiom such as:

        use strict qw(@ISA);
        @ISA = qw(Foo);

これはしかしながら (おそらく) refs, vars, そして subs は強制されている (そして @ISA はどうにかして "宣言されている"という)間違った例外を 発生させたでしょう. しかしこの間違った使用方法では refs, vars, subs の 強制はされません. This however (probably) raised the false expectation that the strict refs, vars and subs were being enforced (and that @ISA was somehow "declared"). But the strict refs, vars, and subs are not enforced when using this false idiom.

Perl 5.8.1 からは前述の例はエラーを発生させることになります. これはうわべは警告もエラーもなく実行されていたプログラムが 5.8.1 ではエラーとするでしょう. これは次のような文で Starting from Perl 5.8.1, the above will cause an error to be raised. This may cause programs which used to execute seemingly correctly without warnings and errors to fail when run under 5.8.1. This happens because

        use strict qw(@ISA);

以下のエラーを発生させるようになります: will now fail with the error:

        Unknown 'strict' tag(s) '@ISA'

これを治療するには以下のような正しい使用方法に直すことです. The remedy to this problem is to replace this code with the correct idiom:

        use strict;
        use vars qw(@ISA);
        @ISA = qw(Foo);
Term::ANSIcolor
Test::Harness

テストスクリプトの余計な及び足りない出力をよりピックアップ. Now much more picky about extra or missing output from test scripts.

Test::More
Test::Simple
Text::Balanced
Time::HiRes

可能であれば nanosleep() の使用. alarm 群の subsecond sleeps のミックス. Use of nanosleep(), if available, allows mixing subsecond sleeps with alarms.

threads

いくつかの修正, 例えば join() 問題やメモリリーク. glibc を使ういくつかのプラットフォーム(Linuxも含まれます)における 1つの ithread に使われる最小メモリ量を数百キロバイト単位で減少. Several fixes, for example for join() problems and memory leaks. In some platforms (like Linux) that use glibc the minimum memory footprint of one ithread has been reduced by several hundred kilobytes.

threads::shared

いくつかのメモリリークを修正. Many memory leaks have been fixed.

Unicode::Collate
Unicode::Normalize
Win32::GetFolderPath
Win32::GetOSVersion

より多くの情報を返すようになりました. Now returns extra information.


ユーティリティの変更点 Utility Changes

h2xs ユーティリティは Foo/Bar/Bar.pm ではなく 今風のレイアウト Foo-Bar/lib/Foo/Bar.pm を生成します. ボイラープレートテスト(?)は t/1.t ではなく t/Foo-Bar.t で呼び出すようになります. The h2xs utility now produces a more modern layout: Foo-Bar/lib/Foo/Bar.pm instead of Foo/Bar/Bar.pm. Also, the boilerplate test is now called t/Foo-Bar.t instead of t/1.t.

Perl デバッガ (lib/perl5db.pl) の広範囲なドキュメント化及び ドキュメント記述中に見つかったバグの修正. The Perl debugger (lib/perl5db.pl) has now been extensively documented and bugs found while documenting have been fixed.

perldoc はより強健に機能的にするために新しく作り直されました. perldoc has been rewritten from scratch to be more robust and featureful.

perlcc -c は壊れ気味ですが perlcc -B はいくらかましに機能 します. (Perl コンパイラ群はその全体が依然 experimental です.) perlcc -B works now at least somewhat better, while perlcc -c is rather more broken. (The Perl compiler suite as a whole continues to be experimental.)


新しいドキュメント New Documentation

perl573delta が追加されました. (いまではとても廃れている) 開発リリース 5.7.2 と 5.7.3 の相違点です. perl573delta has been added to list the differences between the (now quite obsolete) development releases 5.7.2 and 5.7.3.

perl58delta が追加されました: perl 5.8.0 での perldelta です. 5.6.0 と 5.8.0 の詳細な相違点です. perl58delta has been added: it is the perldelta of 5.8.0, detailing the differences between 5.6.0 and 5.8.0.

perlartistic が追加されました: pod format になっている Artistic License です. より簡単に参照を行えます. perlartistic has been added: it is the Artistic License in pod format, making it easier for modules to refer to it.

perlcheat が追加されました: Perl の cheat sheet です. (ごまかしシート??内容はハンディリファレンスみたいです.) perlcheat has been added: it is a Perl cheat sheet.

perlgpl が追加されました: pod format になっている GNU General Public License です. より簡単に参照を行えます. perlgpl has been added: it is the GNU General Public License in pod format, making it easier for modules to refer to it.

perlmacosx が追加されました. Mac OS X での Perl のインストール方法と使用方法です. perlmacosx has been added to tell about the installation and use of Perl in Mac OS X.

perlos400 が追加されました. OS/400 PASE での Perl のインストール方法と使用方法です. perlos400 has been added to tell about the installation and use of Perl in OS/400 PASE.

perlreref が追加されました: 正規表現のクイックリファレンスです. perlreref has been added: it is a regular expressions quick reference.


インストールと設定の改善 Installation and Configuration Improvements

UNIX における標準的な Perl の位置, /usr/bin/perl は, 既にそれが存在するのなら上書きしないようになりました. この変化は身をわきまえたものです. おおくの UNIX ベンダーは 初めから /usr/bin/perl を提供していて, 同時に多くの システムユーティリティが Perl の実際のバージョンに依存しているでしょう. このため上書きしない方が望ましいと判断されました. The UNIX standard Perl location, /usr/bin/perl, is no longer overwritten by default if it exists. This change was very prudent because so many UNIX vendors already provide a /usr/bin/perl, but simultaneously many system utilities may depend on that exact version of Perl, so better not to overwrite it.

site 及びベンダーの, マニュアル及びHTML ページ, スクリプトの インストールディレクトリを指定できるようになりました. INSTALL を参照してください. One can now specify installation directories for site and vendor man and HTML pages, and site and vendor scripts. See INSTALL.

make install 時に DESTDIR 変数に Perl のインストール先にしたい ディレクトリを指定することができるようになりました. (この機能は これまでの Configure -Dinstallprefix=... とは少し違います.) INSTALL を参照してください. One can now specify a destination directory for Perl installation by specifying the DESTDIR variable for make install. (This feature is slightly different from the previous Configure -Dinstallprefix=....) See INSTALL.

gcc バージョン 3.x は Perl のコンパイル時に多くのノイズとなる新しい警告を 発するようになりました: gcc -I既知のディレクトリ (警告: 検索順序に変更がありました). この警告は Configure がコンパイル前に その様なディレクトリを取り除くことで回避しています. gcc versions 3.x introduced a new warning that caused a lot of noise during Perl compilation: gcc -Ialreadyknowndirectory (warning: changing search order). This warning has now been avoided by Configure weeding out such directories before the compilation.

Configure フラグ -Dnoextensions=... 及び -Donlyextensions=... を 使うことで Perl コアモジュールのサブセットをビルドすることが できるようになりました. INSTALL を参照してください. One can now build subsets of Perl core modules by using the Configure flags -Dnoextensions=... and -Donlyextensions=..., see INSTALL.

プラットフォーム固有の機能 Platform-specific enhancements

Cygwin において threads で Perl をビルドできるようになりました (Configure -Duseithreads). Cygwin 1.3.22 及び Cygwin 1.5.3 両方で動作します. In Cygwin Perl can now be built with threads (Configure -Duseithreads). This works with both Cygwin 1.3.22 and Cygwin 1.5.3.

新しい FreeBSD において, malloc.h を使うために Perl 5.8.0 の コンパイルに失敗していました. FreeBSD においてこれはダミーであり, 使おうとすると致命的なエラーとなります. 現在は malloc.h を 使用しないようになりました. In newer FreeBSD releases Perl 5.8.0 compilation failed because of trying to use malloc.h, which in FreeBSD is just a dummy file, and a fatal error to even try to use. Now malloc.h is not used.

日立 HI_UXMPP でビルドできます. Perl is now known to build also in Hitachi HI-UXMPP.

LynxOS で再びビルドできます. Perl is now known to build again in LynxOS.

Mac OS X はインストールディレクトリ名にバージョン番号を 埋め込んでインストールします. これはユーザがコンパイルした Perl のアップグレードを簡単にするため, そして 一般的なインストールディレクトリをより標準にするためです. 言い換えると, デフォルトのままインストールでも Apple が提供している Perl を 破壊してしまうことはありません. その一方で, Configure -Dprefix=/usr の指定をすることで Apple 提供の Perl を本当に置き換えることもできます(十分注意してください). Mac OS X now installs with Perl version number embedded in installation directory names for easier upgrading of user-compiled Perl, and the installation directories in general are more standard. In other words, the default installation no longer breaks the Apple-provided Perl. On the other hand, with Configure -Dprefix=/usr you can now really replace the Apple-supplied Perl (please be careful).

Mac OS X ではデフォルトでスタティックにリンクされた Perl が ビルドされるようになりました. この変更は主に起動の高速化の為です. Apple が提供している Perl はまだ共有, ダイナミックリンクされる ものです. 自分で Perl をビルドするときには Configure -Duseshrplib を指定することで共有を無効にできます. Mac OS X now builds Perl statically by default. This change was done mainly for faster startup times. The Apple-provided Perl is still dynamically linked and shared, and you can enable the sharedness for your own Perl builds by Configure -Duseshrplib.

IBM の OS/400 PASE 環境で Perl を使えるようになりました. PASE 用の Perl を構築する最良の方法は, クロスコンパイル環境として AIX を 使うことです. README.os400 を参照してください. Perl has been ported to IBM's OS/400 PASE environment. The best way to build a Perl for PASE is to use an AIX host as a cross-compilation environment. See README.os400.

別のクロスコンパイルオプションが追加されました: OpenZaurus, Sharp Zaurus PDA 用の Mandrake + Embedix な Linux ディストリビューション向けの の Perl を作成できます. Cross サブディレクトリを参照してください. Yet another cross-compilation option has been added: now Perl builds on OpenZaurus, an Linux distribution based on Mandrake + Embedix for the Sharp Zaurus PDA. See the Cross/README file.

Tru64 で gcc 3 を使用してるときに toke.c の最適化を -O2 に 落としました. これはデフォルトの -O3 では巨大なメモリ消費を 引き起こすためです. Tru64 when using gcc 3 drops the optimisation for toke.c to -O2 because of gigantic memory use with the default -O3.

Tru64 において新しい Berkeley DB で Perl をビルドできます. Tru64 can now build Perl with the newer Berkeley DBs.

WinCE 上での Perl のビルドが高まりました. README.ce 及び README.perlce を参照してください. Building Perl on WinCE has been much enhanced, see README.ce and README.perlce.


バグ修正の抜粋 Selected Bug Fixes

クロージャ, eval, レキシカル Closures, eval and lexicals

無名関数, レキシカル, クロージャに対して多くの修正が施されています. Perl はより "精緻" になったといえますが欠点のあった振る舞いを信頼していた 既存のコードが動かなくなる可能性もあります. とはいえ実際にはこれはとても複雑にネストしている無名関数, eval, レキシカル がなければありそうもないことです. There have been many fixes in the area of anonymous subs, lexicals and closures. Although this means that Perl is now more "correct", it is possible that some existing code will break that happens to rely on the faulty behaviour. In practice this is unlikely unless your code contains a very complex nesting of anonymous subs, evals and lexicals.

一般的な修正 Generic fixes

もし入力ファイルハンドルが :utf8 と設定されていて <FH> からの入力中に UTF-8 を見つけると, 警告が有効になっていれば - それを見送って後で不幸にも壊れたデータを受け取ることになって しまうかわりに - すぐに警告を発します. (:encoding(utf8) レイヤを この目的に使うことも出来ます.) If an input filehandle is marked :utf8 and Perl sees illegal UTF-8 coming in when doing <FH>, if warnings are enabled a warning is immediately given - instead of being silent about it and Perl being unhappy about the broken data later. (The :encoding(utf8) layer also works the same way.)

binmode(SOCKET, ":utf8") はソケットの入力側のみで出力側には 機能していませんでした. これは両方向で機能するように修正されました. binmode(SOCKET, ":utf8") only worked on the input side, not on the output side of the socket. Now it works both ways.

スレッド Perl において getpwent() や getgrent() の様ないくつかの システムデータベース関数 は失敗の代わりにその結果格納バッファを動的に 拡大します. これは多くのユーザやグループを抱えるサイトでこれらの関数が 一部の結果だけを返して失敗することを回避します. For threaded Perls certain system database functions like getpwent() and getgrent() now grow their result buffer dynamically, instead of failing. This means that at sites with lots of users and groups the functions no longer fail by returning only partial results.

Perl 5.8.0 はユーザが独自の大文字<->小文字 Unicode マッピング(Camel が 広告しているように)を定義する互換性を偶発的に破壊していました. この機能は修正され, ドキュメント化もされました. Perl 5.8.0 had accidentally broken the capability for users to define their own uppercase<->lowercase Unicode mappings (as advertised by the Camel). This feature has been fixed and is also documented better.

5.8.0 において次のコード In 5.8.0 this

	$some_unicode .= <FH>;

は正しく機能せずデータを破壊してしまいました. これは現在では修正されています. didn't work correctly but instead corrupted the data. This has now been fixed.

FETCH 等の様なタイされたメソッドでより安全にタイされた値に アクセスできるでしょう, すなわち FETCH 等が安全に再帰できます. とはいっても再帰を収束させるのはお忘れなき様. Tied methods like FETCH etc. may now safely access tied values, i.e. resulting in a recursive call to FETCH etc. Remember to break the recursion, though.

起動時に Perl は それを処理できるまで SIGFPE シグナルをブロックします. これまでこのブロックは実際のところ Perl の中から実行されるプログラムのため でした. 現在では外部プログラムを実行する前に Perl は もとの SIGFPE ハンドラを復元します. At startup Perl blocks the SIGFPE signal away since there isn't much Perl can do about it. Previously this blocking was in effect also for programs executed from within Perl. Now Perl restores the original SIGFPE handling routine, whatever it was, before running external programs.

Perl スクリプトにおいて行番号は 65535 若しくは 2**16 より大きく なれるでしょう. (Perl スクリプトは いつでもこれより大きな値を とることができます. これは単にエラーや警告時の行番号の持っている "ラップされた動作"です.) それほど大きなスクリプトはコードをちょっと考え直した方がいいコトを 示している一方で, その様なコードはスクリプトに生成されたコードなど として存在します. 現在では 4294967296 若しくは 2**32 まで到達できます. Linenumbers in Perl scripts may now be greater than 65536, or 2**16. (Perl scripts have always been able to be larger than that, it's just that the linenumber for reported errors and warnings have "wrapped around".) While scripts that large usually indicate a need to rethink your code a bit, such Perl scripts do exist, for example as results from generated code. Now linenumbers can go all the way to 4294967296, or 2**32.

プラットフォーム固有の修正 Platform-specific fixes

Linux

HP-UX

VMS

Win32


追加された及び変更された診断メッセージ New or Changed Diagnostics

pack() 及び unpack() に関連する全ての警告はより有益なものに, 矛盾のないものに 修正されました. All the warnings related to pack() and unpack() were made more informative and consistent.

変更 "%d 個のスレッドが実行中であるのにあるスレッドで exit が実行されました" Changed "A thread exited while %d threads were running"

以前のメッセージ The old version

    A thread exited while %d other threads were still running

    %d 個の他のスレッドがまだ実行中であるのにあるスレッドで exit が
    実行されました

は "他の" とあるのに警告となったスレッド自身も含まれていたために 誤解を生じていました. was misleading because the "other" included also the thread giving the warning.

削除 "固定されているハッシュをクリアしようとしています" Removed "Attempt to clear a restricted hash"

固定されているハッシュのクリアは不正ではありません. そのためこの警告は削除されました. It is not illegal to clear a restricted hash, so the warning was removed.

追加 "無名関数が不正に宣言されました" New "Illegal declaration of anonymous subroutine"

sub にはコードブロックを指定しなければなりません. You must specify the block of code for sub.

変更 "文字置換(tr)操作において無効な範囲 "%s" が指定されました" Changed "Invalid range "%s" in transliteration operator"

以前のメッセージ The old version

    Invalid [] range "%s" in transliteration operator

    文字置換(tr)操作において無効な [] 範囲 "%s" が指定されました

tr/// には "[] 範囲" がないという点で単純に間違っていました. was simply wrong because there are no "[] ranges" in tr///.

追加 "\c の制御文字名がありません" New "Missing control char name in \c"

それ自身が説明しています. Self-explanatory.

追加 "左詰の文字列 %s に改行があります" New "Newline in left-justified string for %s"

追加の空白が改行の後にあらわれました. これはおそらく予期したものではないでしょう. The padding spaces would appear after the newline, which is probably not what you had in mind.

追加 "ビット演算 %c の優先順位が意図しない可能性があります" New "Possible precedence problem on bitwise %c operator"

次の条件 If you think this

    $x & $y == 0

が $x と $y のビット論理積が 0 であるとテストしたいのなら この警告は好ましいものでしょう. tests whether the bitwise AND of $x and $y is zero, you will like this warning.

追加 "仮想ハッシュは廃止されます" New "Pseudo-hashes are deprecated"

この警告は 5.8.0 からあります. This warning should have been already in 5.8.0, since they are.

追加 "%s 状態のファイルハンドル %s から read() を行いました" New "read() on %s filehandle %s"

閉じられたもしくは開いていないファイルハンドルから read() (もしくは sysread()) は行えません. You cannot read() (or sysread()) from a closed or unopened filehandle.

追加 "5.005 スレッドは廃止されます" New "5.005 threads are deprecated"

この警告は 5.8.0 からあります. This warning should have been already in 5.8.0, since they are.

追加 "使用中のタイ変数が解放(free)されました" New "Tied variable freed while still in use"

生存中に栓を抜かれた何かが変数を解放します, Perl は安全のために保釈します. Something pulled the plug on a live tied variable, Perl plays safe by bailing out.

追加 "To%s: 不正なマッピング '%s'" New "To%s: illegal mapping '%s'"

不正なユーザ定義の Unicode case マッピングが指定されました. An illegal user-defined Unicode casemapping was specified.

追加 "イテレーション中に解放された値を使用しました" New "Use of freed value in iteration"

何かがイテレートしている値を変更しました. これはよいことではありません. Something modified the values being iterated over. This is not good.


内部動作の変更点 Changed Internals

これらのニュースは XS コードを書いているか Perl 内部を知りたかいもしくは ハックしている(Devel::Peek や B:: を使っている), もしくは -D オプションで Perl を実行する人にのみ重要です. These news matter to you only if you either write XS code or like to know about or hack Perl internals (using Devel::Peek or any of the B:: modules counts), or like to run Perl with the -D option.

perlembed [CPAN] にある埋め込みの例は最新に対応するため, そして矛盾をなくすために 書く改められました: 例えば PERL_SYS_INIT3() や PERL_SYS_TERM() の正しい 使用方法等です. The embedding examples of perlembed [CPAN] have been reviewed to be uptodate and consistent: for example, the correct use of PERL_SYS_INIT3() and PERL_SYS_TERM().

Dave Mitchell によって pad コード(レキシカル変数に対して 責任を負っているコード)の広範囲の再活動がなされました. Extensive reworking of the pad code (the code responsible for lexical variables) has been conducted by Dave Mitchell.

John Peacock による v-string の広範囲の動作. Extensive work on the v-strings by John Peacock.

UTF-8 の長さと位置のキャッシュ: Unicode (UTF-8) スカラーの速度向上のために キャッシュが実装されました. 公式の API を経由しないで直接 SV の PV を 書き換えるエクステンションでは潜在的に問題となるでしょう: このときクリアされるべき UTF-8 キャッシュがクリアされないためです. UTF-8 length and position cache: to speed up the handling of Unicode (UTF-8) scalars, a cache was introduced. Potential problems exist if an extension bypasses the official APIs and directly modifies the PV of an SV: the UTF-8 cache does not get cleared as it should.

Perl 5.8.0 で廃止された sv_2pv, sv_catpvn, sv_catsv, sv_setsv が 再び使えるようになりました. APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, sv_setsv, are again available.

cxinc や regatom といった特定の Perl コアの C API が有効でなくなりました. これは故意に行われました. 今後短い名前で有効になるべきではありません. またアプリケーションでこれらに依存しているのなら(そのことを恥じるべきであり, そして) perl5-porters においてでなぜそれが適切であるのか説明して 議論してください. Certain Perl core C APIs like cxinc and regatom are no longer available at all to code outside the Perl core of the Perl core extensions. This is intentional. They never should have been available with the shorter names, and if you application depends on them, you should (be ashamed and) contact perl5-porters to discuss what are the proper APIs.

Perl_list といったいくつかの API が Perl_ プレフィックスなしでは 有効でなくなりました. もしいくつかの関数が見つからなくて XS モジュールが とまったら, いくつかのケースでは関数に Perl_ プレフィックスをつけて 関数呼び出しの最初の引数にスレッドコンテキスト aTHX_ が加わることで 簡単になおるでしょう. これは常にそうされるべきでした: Perl_ の無い形式がコアから偶然漏れたのでしょう. よりきれいに埋め込むためにも, コンパイル時に cpp で PERL_NO_SHORT_NAMES を 定義して全ての API にこれを強制するべきでしょう. Certain Perl core C APIs like Perl_list are no longer available without their Perl_ prefix. If your XS module stops working because some functions cannot be found, in many cases a simple fix is to add the Perl_ prefix to the function and the thread context aTHX_ as the first argument of the function call. This is also how it should always have been done: letting the Perl_-less forms to leak from the core was an accident. For cleaner embedding you can also force this for all APIs by defining at compile time the cpp define PERL_NO_SHORT_NAMES.

Perl_save_bool() が追加されました. Perl_save_bool() has been added.

(qr で生成される) 正規表現オブジェクトは R-magic ではなく S-magic を 持つようになりました. これは /...(??{...;$x})/ 形式において $x に 施された修正を無視してしまわないように修正します. S-magic は最適化や マーキング (??{...})か構築した汚れのある低速度な(従って使われない) キャッシュを解除します. perlguts 内 "Magic Variables" [CPAN] も参照してください. Regexp::Copy がこの影響を受けます. Regexp objects (those created with qr) now have S-magic rather than R-magic. This fixed regexps of the form /...(??{...;$x})/ to no longer ignore changes made to $x. The S-magic avoids dropping the caching optimization and making (??{...}) constructs obscenely slow (and consequently useless). See also "Magic Variables" in perlguts [CPAN]. Regexp::Copy was affected by this change.

Perl の内部でバック用マクロ DEBUG() 及び DEB() が名前の衝突を 避けるために PERL_DEBUG() 及び PERL_DEB() に変更されました. The Perl internal debugging macros DEBUG() and DEB() have been renamed to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.

-DL が削除されました. (リークテストは破損していて長いこと サポートされていません. 代わりにデバッグ malloc を使うか valgrind や Purify といったツールを使ってください.) -DL removed (the leaktest had been broken and unsupported for years, use alternative debugging mallocs or tools like valgrind and Purify).

冗長修飾子 v-DXv 及び -Dsv に追加されました. perlrun [CPAN] を参照してください. Verbose modifier v added for -DXv and -Dsv, see perlrun [CPAN].


新しいテスト New Tests

Perl 5.8.0 では約 700 のテストファイルに およそ 69,000 のテストがありました. Perl 5.8.1 では約 750 のテストファイルに およそ 75,000 のテストがあります. 正確な数は Perl の設定やOSプラットフォームに依存して変化します. In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, in Perl 5.8.1 there are about 77000 separate tests in about 780 test files. The exact numbers depend on the Perl configuration and on the operating system platform.


既知の問題点 Known Problems

"非互換となる変更点" に記述されている ハッシュのランダム性は明らかに未決定事項です: これは休眠しているバグを 目覚めさせ, 間違っていた仮定を揺り動かすでしょう. The hash randomisation mentioned in "Incompatible Changes" is definitely problematic: it will wake dormant bugs and shake out bad assumptions.

mod_perl 2.x を Perl 5.8.1 で使おうとしているのなら, mod_perl-1.99_10 以降を使う必要があるでしょう. mod_perl 2.x のそれ以前のバージョンでは ランダムなハッシュでは機能しません. (mod_perl 1.x では大丈夫です.) Apache::Test 1.04 以降も必要になるでしょう. If you want to use mod_perl 2.x with Perl 5.8.1, you will need mod_perl-1.99_10 or higher. Earlier versions of mod_perl 2.x do not work with the randomised hashes. (mod_perl 1.x works fine.) You will also need Apache::Test 1.04 or higher.

稀なプラットフォームの Perl 5.8.0 が 100% もしくはほぼ 100% 近く動作する 箇所の多くで, そのメンテナが多忙であったために幾分世話が遠くなっていました. その様なプラットフォームでは他のプラットフォームより失敗が多くなるでしょう. Max OS Classic, IBM z/OS (及び他のEBCDIC プラットフォーム), NetWare などが 当たります. 多くの共通の Perl プラットフォーム (Unix 及び Unixライクな プラットフォーム, Microsoft プラットフォーム, VMS) は良く行う十分の多くの テストとエキスパート人口があります. Many of the rarer platforms that worked 100% or pretty close to it with perl 5.8.0 have been left a little bit untended since their maintainers have been otherwise busy lately, and therefore there will be more failures on those platforms. Such platforms include Mac OS Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most common Perl platforms (Unix and Unix-like, Microsoft platforms, and VMS) have large enough testing and expert population that they are doing well.

スカラーコンテキストでのタイされたハッシュの評価 Tied hashes in scalar context

これまでタイされたハッシュはスカラーコンテキストでは有用な値を 返していませんでした. 例えば真偽テストを次のようにしても: Tied hashes do not currently return anything useful in scalar context, for example when used as boolean tests:

	if (%tied_hash) { ... }

これまでのばかげた振る舞いではハッシュが空か要素を持っているかに かかわらず常に偽となっていました. The current nonsensical behaviour is always to return false, regardless of whether the hash is empty or has elements.

この根本的な原因はハッシュのスカラーコンテキストでの振る舞いを 実装するためのインターフェースが無かったことでした. The root cause is that there is no interface for the implementors of tied hashes to implement the behaviour of a hash in scalar context.

Net::Ping 450_service 及び 510_ping_udp の失敗 Net::Ping 450_service and 510_ping_udp failures

lib/Net/Ping/t/450_service.t のサブテスト 9, 18, lib/Net/Ping/t/510_ping_udp.t のサブテスト 2 はあまりないネットワーク 設定を行っていると失敗します. 例えば後者は UDP ping を IP アドレス 127.0.0.1 に送ろうとします. The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have an unusual networking setup. For example in the latter case the test is trying to send a UDP ping to the IP address 127.0.0.1.

B::C

C言語を生成するコンパイラのバックエンドである B::C (フロントエンド は perlcc -c になります)がいくらかこわれぎみです. 広範囲の レキシカル変数の変更によるものです. (朗報もあります. B::Bytecode 及び ByteLoader は改善されています. ) The C-generating compiler backend B::C (the frontend being perlcc -c) is even more broken than it used to be because of the extensive lexical variable changes. (The good news is that B::Bytecode and ByteLoader are better than they used to be.)


プラットフォーム固有の問題点 Platform Specific Problems

EBCDIC プラットフォーム EBCDIC Platforms

IBM z/OS 及び他の EBCDIC プラットフォームは Unicode サポートに関して 不明確なままです. 多くのユニコードテストは修正すべき箇所をスキップ します. IBM z/OS and other EBCDIC platforms continue to be problematic regarding Unicode support. Many Unicode tests are skipped when they really should be fixed.

Cygwin 1.5 における問題 Cygwin 1.5 problems

Cygwin 1.5 において io/tell 及び op/sysio テストがいくつかの 未知の原因で失敗します. 1.5.5 ではスレッドテスト stress_cv, stress_re, stress_string が環境変数 PERLIO に "perlio" を設定 している時以外は失敗します(この時 io/tell も失敗します). が In Cygwin 1.5 the io/tell and op/sysio tests have failures for some yet unknown reason. In 1.5.5 the threads tests stress_cv, stress_re, and stress_string are failing unless the environment variable PERLIO is set to "perlio" (which makes also the io/tell failure go away).

Perl 5.8.1 は Cygwin 1.3: (uname -a) CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ... ではビルドでき, ちゃんと動作します. "make test" は Configure -des -Duseithreads で 100% 成功します. Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a) CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ... a 100% "make test" was achieved with Configure -des -Duseithreads.

HP-UX: HP cc は sendfile 及び sendpath について警告を発します HP-UX: HP cc warnings about sendfile and sendpath

いくつかの HP C コンパイラリリース (例えば B.11.11.02) では 次のような警告をだします(見やすいように改行しています): With certain HP C compiler releases (e.g. B.11.11.02) you will get many warnings like this (lines wrapped for easier reading):

  cc: "/usr/include/sys/socket.h", line 504: warning 562:
    Redeclaration of "sendfile" with a different storage class specifier:
      "sendfile" will have internal linkage.
  cc: "/usr/include/sys/socket.h", line 505: warning 562:
    Redeclaration of "sendpath" with a different storage class specifier:
      "sendpath" will have internal linkage.

  cc: "/usr/include/sys/socket.h", line 504: warning 562:
     異なるストレージクラス指示子による "sendfile" の再宣言:
      "sendfile" は内部リンケージになります.
  cc: "/usr/include/sys/socket.h", line 505: warning 562:
     異なるストレージクラス指示子による "sendpath" の再宣言:
      "sendpath" は内部リンケージになります.

この警告は Perl のビルド中や C コンパイラを呼び出す lib/ExtUtils の テストで発生します. しかしこれは重大なものではなく無視することができます. The warnings show up both during the build of Perl and during certain lib/ExtUtils tests that invoke the C compiler. The warning, however, is not serious and can be ignored.

IRIX: t/uni/tr_7jis.t 誤った失敗 IRIX: t/uni/tr_7jis.t falsely failing

いくつかの IRIX リリース (少なくとも IRIX 6.5 及び MIPSpro Compiler Version 7.3.1.1m) での 'make test' もしくは test harness において t/uni/tr_7jis.t が失敗と報告することが知られています. しかしこれは手動でテストしたときには完全にパスできます. The test t/uni/tr_7jis.t is known to report failure under 'make test' or the test harness with certain releases of IRIX (at least IRIX 6.5 and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test fully passes.

Mac OS X: usemymalloc がありません Mac OS X: no usemymalloc

すべての Mac OS X において Perl malloc (-Dusemymalloc) は 機能しません. これはネイティブの malloc がきちんと動作してるので 大きな問題ではありません. The Perl malloc (-Dusemymalloc) does not work at all in Mac OS X. This is not that serious, though, since the native malloc works just fine.

Tru64: GNU cc (gcc) でスレッドをビルドできません Tru64: No threaded builds with GNU cc (gcc)

最近の Tru64 リリース (例えば v5.1B) において gcc (3.3) をスレッド Perl をビルドするために使えません(-Duseithreads). システムの <pthread.h> ファイルを gcc が見つけられないためです. In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used to compile a threaded Perl (-Duseithreads) because the system <pthread.h> file doesn't know about gcc.

Win32: sysopen, sysread, syswrite

Perl 5.8.0 リリース現在で sysopen()/sysread()/syswrite() "テキスト" モード において 5.6.1 やそれ以前で使われていたような振る舞いをとりません. これらのビルトイン関数は (sysopen() に O_TEXT フラグを指定したり, binmode() をファイルハンドルに使ったとしても) "バイナリ" モードとして処理されます. このことはディスク上のファイルにのみ関係することで, Windows 版においては ソケットやパイプは常に "バイナリ" モードとなります. この振る舞いは現在はバグとして考えられ, 今後互換のある振る舞いが提供される でしょう. それまでは sysopen()/sysread()/syswrite() の使用時における "テキスト" モード操作はサポートされません. As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave like they used to in 5.6.1 and earlier with respect to "text" mode. These built-ins now always operate in "binary" mode (even if sysopen() was passed the O_TEXT flag, or if binmode() was used on the file handle). Note that this issue should only make a difference for disk files, as sockets and pipes have always been in "binary" mode in the Windows port. As this behavior is currently considered a bug, compatible behavior may be re-introduced in a future release. Until then, the use of sysopen(), sysread() and syswrite() is not supported for "text" mode operations.


今後の展開 Future Directions

以下のことが今後おこるでしょう. これらの特徴を持つ最初の公的なリリースは開発者リリース Perl 5.9.x になり, Perl 5.10.0 になるでしょう. これらは当時の最良となる推測です: 私たちは考え直す権利を持っています. The following things might happen in future. The first publicly available releases having these characteristics will be the developer releases Perl 5.9.x, culminating in the Perl 5.10.0 release. These are our best guesses at the moment: we reserve the right to rethink.


バグレポート Reporting Bugs

もしバグと思われるものが見つかったら, comp.lang.perl.misc ニュース グループに最近投稿された記事や http://bugs.perl.org/ にある perl バグデータベースを確認してください. Perl ホームページ, http://www.perl.com/ 情報はにもあります. If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://bugs.perl.org/ . There may also be information at http://www.perl.com/ , the Perl Home Page.

もしまだ報告されていないバグだと確信したら, そのリリースに含まれている perlbug プログラムをを実行してください. バグの再現スクリプトを十分小さく, しかし有効なコードに切りつめることを意識してください. バグレポートは perl -V の出力と一緒に perlbug@perl.org に送られ Perl porting チームによって解析されるます. Perl 5 のバグについては http://bugs.perl.org/ で閲覧及び検索することができます. If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of perl -V, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. You can browse and search the Perl 5 bugs at http://bugs.perl.org/


関連項目 SEE ALSO

Changes ファイルに変更点の完全な詳細があります. The Changes file for exhaustive details on what changed.

INSTALL ファイルに Perl のビルド方法があります. The INSTALL file for how to build Perl.

README ファイルに一般的なことがあります. The README file for general stuff.

Artistic 及び Copying ファイルに著作権情報があります. The Artistic and Copying files for copyright information.


和訳 TRANSALTE TO JAPANESE

 山科 氷魚 (YAMASHINA Hio) <hio@hio.jp>

原典: perl VERSION 5.8.8. 翻訳日: 2003-09-28 (perl-5.8.1) Original distribution is perl VERSION 5.8.8. Translated on 2003-09-28 (perl-5.8.1)

perldelta - perl v5.8.1 での変更点
perl581delta - what is new for perl v5.8.1

索引 INDEX

perldelta - perl v5.8.1 での変更点
perl581delta - what is new for perl v5.8.1