perldelta - perl v5.8.8 の新機能
perldelta - what is new for perl v5.8.8

目次 TABLE OF CONTENTS


名前 NAME

perldelta - perl v5.8.8 の新機能 perldelta - what is new for perl v5.8.8


説明 DESCRIPTION

このドキュメントでは 5.8.7 リリースと 5.8.8 リリースとでの相異点を 説明します. This document describes differences between the 5.8.7 release and the 5.8.8 release.


非互換となる修正 Incompatible Changes

5.8.7 と意図的な非互換はありません. もしなにか非互換と思われる事項が ありましたら, それらはバグでしょう. ぜひ報告をお願いします. There are no changes intentionally incompatible with 5.8.7. If any exist, they are bugs and reports are welcome.


コアの機能拡張 Core Enhancements


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


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

h2xs の強化 h2xs enhancements

h2xs は後方互換モジュールであっても XSLoader の使用を 強制する新しいオプション --use-xsloader を実装しました. h2xs implements new option --use-xsloader to force use of XSLoader even in backwards compatible modules.

アポストロフィを含んだauthor名の処理が修正されました. The handling of authors' names that had apostrophes has been fixed.

負の値を持つenumはスキップされるようになりました. Any enums with negative values are now skipped.

perlivp の強化 perlivp enhancements

perlivp は新しいオプション -a を実装しました. そしてデフォルトでは *.ph ファイルはチェックしなくなります. すべてのテストを走らせる ためには -a オプションを使うようにしてください. perlivp implements new option -a and will not check for *.ph files by default any more. Use the -a option to run all tests.


新しいドキュメント New Documentation

perlglossary [CPAN] マニュアルページは Perl で使われる技術的な単語その他の 用語集です. 親切な O'Reilly Media, inc. から提供されました. The perlglossary [CPAN] manpage is a glossary of terms used in the Perl documentation, technical and otherwise, kindly provided by O'Reilly Media, inc.


パフォーマンスの強化 Performance Enhancements


インストールとコンフィグレーションの改善 Installation and Configuration Improvements

平行(parallel) make は正常に動作するようになっているでしょう. make test を平行に実行する事には問題が残りますが. Parallel makes should work properly now, although there may still be problems if make test is instructed to run in parallel.

Win32 において Borland のコンパイラ(群)でのビルドはよりスムーズに なりました. 特に Steve Hay はそれらのコンパイラが発する警告の減少 と, そのうちの少なくとも1つで発生した内部エラーの除去に取り組んで くれました. Building with Borland's compilers on Win32 should work more smoothly. In particular Steve Hay has worked to side step many warnings emitted by their compilers and at least one C compiler internal error.

Alan Burlison からのパッチのおかげで Configureclearenvunsetenv を検出するようになりました. また, futimes の検出と sprintf が整形した文字列の長さを正しく返すかどうかの検出も行いますが, これは perl 5.8.9 で使われます. Configure will now detect clearenv and unsetenv, thanks to a patch from Alan Burlison. It will also probe for futimes and whether sprintf correctly returns the length of the formatted string, which will both be used in perl 5.8.9.

next-3.0, vmesa, IX, Darwin, Solaris, Linux, DEC/OSF, HP-UX および MPE/iX でのヒントの改善. There are improved hints for next-3.0, vmesa, IX, Darwin, Solaris, Linux, DEC/OSF, HP-UX and MPE/iX

Vadim Konovalov の働きのおかげで Windows において Perl エクステンションを Perl DLL にスタティックにビルドできるようになりました. (これは 実際には 5.8.7 で改善されていますが手違いで perl587delta [CPAN] に 記載されていませんでした.) Perl extensions on Windows now can be statically built into the Perl DLL, thanks to a work by Vadim Konovalov. (This improvement was actually in 5.8.7, but was accidentally omitted from perl587delta [CPAN]).


バグ修正のピックアップ Selected Bug Fixes

-w を使っていても no warnings 'category' が正しく機能するようになりました no warnings 'category' works correctly with -w

これまで -w でグローバルに警告を有効にして実行していると 特定の警告カテゴリを選択して無効にしたときに全ての警告を無効に してしまっていました. これは修正されました; 現在では no warnings 'io';io クラスでの警告のみを無効にします. これまでは間違って全ての 警告を無効にしてしまっていました. Previously when running with warnings enabled globally via -w, selective disabling of specific warning categories would actually turn off all warnings. This is now fixed; now no warnings 'io'; will only turn off warnings in the io class. Previously it would erroneously turn off all warnings.

この修正によりいくつかのプログラムが正しく警告を発するようになります. This bug fix may cause some programs to start correctly issuing warnings.

過剰な最適化の除去 Remove over-optimisation

Perl 5.8.4 はスカラーへの undef の代入, 配列やハッシュへの 空のリストの代入を最適化により除去する変更を施しました. goto ジャンプを伴うときにはこれが問題となることがあったため, この処理は取り消されました. Perl 5.8.4 introduced a change so that assignments of undef to a scalar, or of an empty list to an array or a hash, were optimised away. As this could cause problems when goto jumps were involved, this change has been backed out.

sprintf() の修正 sprintf() fixes

いくつかのフォーマットで sprintf() 関数を使うと特定の条件下で バッファオーバーフローを起こすことがありましたが, 他のいくつかの バグと共に, 特に境界チェックと共に修正されました. Using the sprintf() function with some formats could lead to a buffer overflow in some specific cases. This has been fixed, along with several other bugs, notably in bounds checking.

関連する修正として, Sys::Syslog のドキュメントに従っていない 粗悪なコードでフォーマット文字列の脆弱性を持つことがありました. Sys::Syslog は質の低いサードパーティ製のコードから人々を保護 するように修正されました. In related fixes, it was possible for badly written code that did not follow the documentation of Sys::Syslog to have formatting vulnerabilities. Sys::Syslog has been changed to protect people from poor quality third party code.

デバッガとUnicodeでの速度低下 Debugger and Unicode slowdown

Unicode データの処理を perl のデバッガ上で実行すると思いがけなく 大きな速度低下が見られるとの報告がありました. これに相当する原因は Nicholas Clark によって確認及び修正されました. It had been reported that running under perl's debugger when processing Unicode data could cause unexpectedly large slowdowns. The most likely cause of this was identified and fixed by Nicholas Clark.

小さな修正たち Smaller fixes


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

Attempt to set length of freed array

『解放された配列に長さを設定しようとしました』 これは新しい警告です. 次のような状況で発生します: This is a new warning, produced in situations such as this:

    $r = do {my @a; \$#a};
    $$r = 503;

Non-string passed as bitmask

『文字列でないものがビットマスクとして渡されました』 これは新しい警告です. select() の引数に対してビットマスクではなく 数値が渡されたときに発生します. This is a new warning, produced when number has been passed as a argument to select(), instead of a bitmask.

    # Wrong, will now warn
    $rin = fileno(STDIN);
    ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
    
    # Should be
    $rin = '';
    vec($rin,fileno(STDIN),1) = 1;
    ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);

Search pattern not terminated or ternary operator parsed as search pattern

『検索パターンが終了していないか3項演算子が検索パターンとして 検出されました』 この構文エラーは ?PATTERN? を構成する終わりの 区切り子(delimiter)を字句解析機が見つけられなかったことを意味します. ここで3項演算子をあげることで構文の確認を行いやすくしています. This syntax error indicates that the lexer couldn't find the final delimiter of a ?PATTERN? construct. Mentioning the ternary operator in this error message makes it easier to diagnose syntax errors.


内部処理の変更 Changed Internals

C ソースコード上で, 一部は整頓のためとメンテナンス性の向上の ためにですが, かなりの量のリファクタリングが行われました. 結果として オブジェクトコードと perl バイナリは 5.8.7 より小さくなりました. 特に, Dave Mitchell によって寄稿された warnings のコードが著しく 小さくなりました. 小さくなったことと速くなった事は別として, ユーザが認識すべき変更点はありません. There has been a fair amount of refactoring of the C source code, partly to make it tidier and more maintainable. The resulting object code and the perl binary may well be smaller than 5.8.7, in particular due to a change contributed by Dave Mitchell which reworked the warnings code to be significantly smaller. Apart from being smaller and possibly faster, there should be no user-detectable changes.

Andy Lester は C コンパイラに対して実質 const として宣言 されるべき関数パラメータとローカル変数の改善を多く提供してくれました. Steve Peters は新しい *_set マクロを提供し, LVALUE コンテキストにおいて マクロに代入するのでなくこれを使うようにコアの書き換えを行って くれました. Andy Lester supplied many improvements to determine which function parameters and local variables could actually be declared const to the C compiler. Steve Peters provided new *_set macros and reworked the core to use these rather than assigning to macros in LVALUE context.

Dave Mitchell は -DT における字句解析機のデバッグ出力を 改善してくれました. Dave Mitchell improved the lexer debugging output under -DT

Nicholas Clark は文字列バッファの確保を次の4の倍数(64bitポインタの プラットホームでは8の倍数)に丸めるように変更しました. これにより 実質余分なメモリを使うことなく realloc の回数を削減できます. Nicholas Clark changed the string buffer allocation so that it is now rounded up to the next multiple of 4 (or 8 on platforms with 64 bit pointers). This should reduce the number of calls to realloc without actually using any extra memory.

HV のもつ HE* の配列は適切な(最小の)サイズを確保するように なりました. Nicholas Clark のまた別の修正によるものです. -DPERL_USE_LARGE_HV_ALLOC をつけてコンパイルすることで これまでのずさんで怠惰な実装を使うことも出来ます. The HV's array of HE*s is now allocated at the correct (minimal) size, thanks to another change by Nicholas Clark. Compile with -DPERL_USE_LARGE_HV_ALLOC to use the old, sloppier, default.

XS や埋め込みデバッグ用に, perl が -DDEBUG_LEAKING_SCALARS に 加えて -DDEBUG_LEAKING_SCALARS_FORK_DUMP もつけてコンパイル することでグローバルデストラクションの直前に子プロセスを fork させる事が出来ます. これによりグローバルデストラクションの終了時に 漏れていた任意のスカラーの値を出力することができます. これが ない場合には, スカラーは検出した地点では既に十分に解放されていて, そこでは意味のあるダンプは出力できないでしょう. この機能は Mike Giroux によるアイデアを根気のいい Nicholas Clark が実装 したものです. For XS or embedding debugging purposes, if perl is compiled with -DDEBUG_LEAKING_SCALARS_FORK_DUMP in addition to -DDEBUG_LEAKING_SCALARS then a child process is forked just before global destruction, which is used to display the values of any scalars found to have leaked at the end of global destruction. Without this, the scalars have already been freed sufficiently at the point of detection that it is impossible to produce any meaningful dump of their contents. This feature was implemented by the indefatigable Nicholas Clark, based on an idea by Mike Giroux.


プラットホーム固有の問題 Platform Specific Problems

HP-UX 11.23 (Itanium 2) 上の最適化は HP C-ANSI-C を使用している場合に 現在部分的に無効にされています(+O1 にスケールダウン); これは 高レベルの最適化による問題の原因がまだ不明瞭なためです. The optimiser on HP-UX 11.23 (Itanium 2) is currently partly disabled (scaled down to +O1) when using HP C-ANSI-C; the cause of problems at higher optimisation levels is still unclear.

VMS において失敗するテストがいくつかあります. これはこのリリースにおいて, 開発ストリームから修正された分の統合のために, 多すぎる依存関係と共にテストの修正や小さなモジュールの修正が 行われたためです. 以下に既知の失敗と, それに気付いて修正された パッチ番号を並べておきます. There are a handful of remaining test failures on VMS, mostly due to test fixes and minor module tweaks with too many dependencies to integrate into this release from the development stream, where they have all been corrected. The following is a list of expected failures with the patch number of the fix where that is known:

    ext/Devel/PPPort/t/ppphtest.t  #26913
    ext/List/Util/t/p_tainted.t    #26912
    lib/ExtUtils/t/PL_FILES.t      #26813
    lib/ExtUtils/t/basic.t         #26813
    t/io/fs.t
    t/op/cmp.t

バグ報告 Reporting Bugs

もしバグと思われるものが見つかったら, comp.lang.perl.misc ニュース グループに最近投稿された記事や http://bugs.perl.org にある perl バグデータベースを確認してください. Perl ホームページ, http://www.perl.org にも情報はあります. 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.org, 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. 翻訳日: 2006-02-04. Origlnal distribution is perl VERSION 5.8.8. Translated at 2006-02-04.

perldelta - perl v5.8.8 の新機能
perldelta - what is new for perl v5.8.8

索引 INDEX

perldelta - perl v5.8.8 の新機能
perldelta - what is new for perl v5.8.8