argra****@users*****
argra****@users*****
2010年 6月 1日 (火) 03:31:53 JST
Index: docs/perl/5.12.1/perlfunc.pod diff -u docs/perl/5.12.1/perlfunc.pod:1.4 docs/perl/5.12.1/perlfunc.pod:1.5 --- docs/perl/5.12.1/perlfunc.pod:1.4 Sun May 30 01:54:50 2010 +++ docs/perl/5.12.1/perlfunc.pod Tue Jun 1 03:31:52 2010 @@ -225,13 +225,13 @@ =end original Extension modules can also hook into the Perl parser to define new -kinds of keyword-headed expression. These may look like functions, but -may also look completely different. The syntax following the keyword -is defined entirely by the extension. If you are an implementor, see -L<perlapi/PL_keyword_plugin> for the mechanism. If you are using such -a module, see the module's documentation for details of the syntax that -it defines. -(TBT) +kinds of keyword-headed expression. +これらは関数のように見えるかもしれませんが、全く別物かもしれません。 +キーワード以降の文法は完全にエクステンションによって定義されます。 +もしあなたが実装者なら、この機構については L<perlapi/PL_keyword_plugin> を +参照してください。 +もしあなたがそのようなモジュールを使っているなら、 +定義されている文法の詳細についてはモジュールの文書を参照してください。 =head2 Perl Functions by Category X<function> @@ -2665,9 +2665,8 @@ =end original -B<Be aware> that calling delete on array values is deprecated and likely to -be removed in a future version of Perl. -(TBT) +配列の値に対して delete を呼び出すことは非推奨で、将来のバージョンの +Perl では削除されるであろうことに B<注意してください>。 =begin original @@ -5827,10 +5826,10 @@ =end original -The behavior of kill when a I<PROCESS> number is zero or negative depends on -the operating system. For example, on POSIX-conforming systems, zero will -signal the current process group and -1 will signal all processes. -(TBT) +I<PROCESS> 番号が 0 あるいは負数の場合の kill の振る舞いは +オペレーティングシステムに依存します。 +例えば、POSIX 準拠のシステムでは、0 は現在のプロセスグループにシグナルを送り、 +-1 は全てのプロセスにシグナルを送ります。 =begin original @@ -5928,13 +5927,14 @@ =end original -What gets returned depends on several factors: -(TBT) +返り値として得られるものは色々な要素に依存します: =over =item If C<use bytes> is in effect: +(C<use bytes> が有効の場合) + =over =item On EBCDIC platforms @@ -5945,8 +5945,7 @@ =end original -The results are what the C language system call C<tolower()> returns. -(TBT) +結果は、C 言語のシステムコール C<tolower()> が返すものです。 =item On ASCII platforms @@ -5957,14 +5956,15 @@ =end original -The results follow ASCII semantics. Only characters C<A-Z> change, to C<a-z> -respectively. -(TBT) +結果は ASCII の意味論に従います。 +C<A-Z> のみが変換され、それぞれ C<a-z> になります。 =back =item Otherwise, If EXPR has the UTF8 flag set +(その他の場合で、EXPR に UTF8 フラグがセットされている場合) + =begin original If the current package has a subroutine named C<ToLower>, it will be used to @@ -5973,24 +5973,28 @@ =end original -If the current package has a subroutine named C<ToLower>, it will be used to -change the case (See L<perlunicode/User-Defined Case Mappings>.) -Otherwise Unicode semantics are used for the case change. -(TBT) +現在のパッケージで C<ToLower> という名前のサブルーチンがある場合、 +大文字小文字を変換するためにこれが使われます +(L<perlunicode/User-Defined Case Mappings> を参照してください)。 +さもなければ、大文字小文字変換には Unicode の意味論が使われます。 =item Otherwise, if C<use locale> is in effect +(それ以外の場合で、C<use locale> が有効の場合) + =begin original Respects current LC_CTYPE locale. See L<perllocale>. =end original -Respects current LC_CTYPE locale. See L<perllocale>. -(TBT) +現在の LC_CTYPE ロケールに従います。 +L<perllocale> を参照してください。 =item Otherwise, if C<use feature 'unicode_strings'> is in effect: +(それ以外の場合で、C<use feature 'unicode_strings'> が有効の場合) + =begin original Unicode semantics are used for the case change. Any subroutine named @@ -5998,12 +6002,13 @@ =end original -Unicode semantics are used for the case change. Any subroutine named -C<ToLower> will not be used. -(TBT) +大文字小文字変換には Unicode の意味論が使われます。 +C<ToLower> という名前のサブルーチンは使われません。 =item Otherwise: +(それ以外の場合) + =over =item On EBCDIC platforms @@ -6014,8 +6019,7 @@ =end original -The results are what the C language system call C<tolower()> returns. -(TBT) +結果は、C 言語のシステムコール C<tolower()> が返すものです。 =item On ASCII platforms @@ -6026,9 +6030,8 @@ =end original -ASCII semantics are used for the case change. The lowercase of any character -outside the ASCII range is the character itself. -(TBT) +大文字小文字変換には ASCII の意味論が使われます。 +ASCII の範囲外の文字の「小文字」はその文字自身です。 =back @@ -6066,9 +6069,8 @@ =end original -This function behaves the same way under various pragma, such as in a locale, -as L</lc> does. -(TBT) +この関数は、ロケールのような様々なプラグマの影響下では、 +L</lc> と同様に振る舞います。 =item length EXPR X<length> X<size> @@ -6108,10 +6110,12 @@ =end original -Like all Perl character operations, length() normally deals in logical -characters, not physical bytes. For how many bytes a string encoded as +全ての Perl の文字操作と同様、length() は通常物理的なバイトではなく +論理文字を扱います。 +For how many bytes a string encoded as UTF-8 would take up, use C<length(Encode::encode_utf8(EXPR))> (you'll have -to C<use Encode> first). See L<Encode> and L<perlunicode>. +to C<use Encode> first). +L<Encode> と L<perlunicode> を参照してください。 (TBT) =item link OLDFILE,NEWFILE @@ -6182,7 +6186,8 @@ The C<delete local EXPR> construct can also be used to localize the deletion of array/hash elements to the current block. -See L<perlsub/"Localized deletion of elements of composite types">. +L<perlsub/"Localized deletion of elements of composite types"> を +参照してください。 (TBT) =item localtime EXPR @@ -6409,9 +6414,8 @@ lock() は「弱いキーワード」です: もしユーザーが(呼び出し前に) この名前で関数を定義すると、定義された関数の方が呼び出されます。 -If you are not under C<use threads::shared> this does nothing. -See L<threads::shared>. -(TBT) +C<use threads::shared> の影響下でない場合は、これは何もしません。 +L<threads::shared> を参照してください。 =item log EXPR X<log> X<logarithm> X<e> X<ln> X<base> @@ -8016,8 +8020,7 @@ =end original -See L<perlpacktut> for an introduction to this function. -(TBT) +この関数の説明については L<perlpacktut> を参照してください。 =begin original @@ -8862,8 +8865,7 @@ =end original -or programmatically via the C<Config> module: -(TBT) +あるいは C<Config> モジュールからプログラムで: use Config; print $Config{shortsize}, "\n"; @@ -8932,9 +8934,8 @@ I<ビッグエンディアン> とI<リトルエンディアン> の名前は 古典である「ガリバー旅行記」とリリパット族の卵を食べる習慣から 取られています。 -This entered computer lingo via the paper "On Holy Wars and a Plea for -Peace" by Danny Cohen, USC/ISI IEN 137, April 1, 1980. -(TBT) +"On Holy Wars and a Plea for Peace" by Danny Cohen, USC/ISI IEN 137, +April 1, 1980 の文書からコンピュータ用語として取り入れられました。 =begin original @@ -8976,8 +8977,7 @@ =end original -or from the command line: -(TBT) +あるいはコマンドラインで: $ perl -V:byteorder @@ -9663,9 +9663,8 @@ =end original -Printing to a closed pipe or socket will generate a SIGPIPE signal. See -L<perlipc> for more on signal handling. -(TBT) +Printing to a closed pipe or socket will generate a SIGPIPE signal. +さらなるシグナル操作については L<perlipc> を参照してください。 =item printf FILEHANDLE FORMAT, LIST X<printf> @@ -9836,7 +9835,8 @@ quotemeta (and C<\Q> ... C<\E>) are useful when interpolating strings into regular expressions, because by default an interpolated variable will be -considered a mini-regular expression. For example: +considered a mini-regular expression. +例えば: (TBT) my $sentence = 'The quick brown fox jumped over the lazy dog'; @@ -10061,9 +10061,8 @@ =end original -As of Perl 5.11.2 you can use a bare C<readdir> in a C<while> loop, -which will set C<$_> on every iteration. -(TBT) +Perl 5.11.2 から裸の C<readdir> を C<while> で使うことができ、 +この場合繰り返し毎に C<$_> にセットされます。 opendir(my $dh, $some_dir) || die; while(readdir $dh) { @@ -15788,10 +15787,9 @@ C<feature> プラグマも読み込み、要求されたバージョンで利用可能な全ての機能を 有効にします。 L<feature> を参照してください。 -Similarly, if the specified Perl version is greater than or equal to -5.11.0, strictures are enabled lexically as with C<use strict> (except -that the F<strict.pm> file is not actually loaded). -(TBT) +同様に、指定された Perl のバージョンが 5.11.0 以上の場合、 +制限は C<use strict> と同様にレキシカルに有効になります +(但し F<strict.pm> ファイルは実際には読み込まれません)。 =begin original @@ -15917,11 +15915,13 @@ =end original -Because C<use> takes effect at compile time, it doesn't respect the -ordinary flow control of the code being compiled. In particular, putting +C<use> はコンパイル時に有効なので、コードがコンパイルされる際の通常の +流れ制御には従いません。 +In particular, putting a C<use> inside the false branch of a conditional doesn't prevent it -from being processed. If a module or pragma only needs to be loaded -conditionally, this can be done using the L<if> pragma: +from being processed. +モジュールやプラグマを条件付きでのみ読み込みたい場合、 +L<if> プラグマを使って実現できます: (TBT) use if $] < 5.008, "utf8";