[perldocjp-cvs 639] CVS update: docs/perl/5.12.1

Back to archive index

argra****@users***** argra****@users*****
2010年 7月 24日 (土) 04:36:16 JST


Index: docs/perl/5.12.1/perlfunc.pod
diff -u docs/perl/5.12.1/perlfunc.pod:1.5 docs/perl/5.12.1/perlfunc.pod:1.6
--- docs/perl/5.12.1/perlfunc.pod:1.5	Tue Jun  1 03:31:52 2010
+++ docs/perl/5.12.1/perlfunc.pod	Sat Jul 24 04:36:16 2010
@@ -224,8 +224,8 @@
 
 =end original
 
-Extension modules can also hook into the Perl parser to define new
-kinds of keyword-headed expression.
+エクステンションモジュールは、新しい種類のキーワードが頭に付いた式を
+定義するために Perl パーサをフックできます。
 これらは関数のように見えるかもしれませんが、全く別物かもしれません。
 キーワード以降の文法は完全にエクステンションによって定義されます。
 もしあなたが実装者なら、この機構については L<perlapi/PL_keyword_plugin> を
@@ -1486,20 +1486,21 @@
 
 =end original
 
-Also be aware that setting C<@DB::args> is I<best effort>, intended for
-debugging or generating backtraces, and should not be relied upon. In
-particular, as C<@_> contains aliases to the caller's arguments, Perl does
-not take a copy of C<@_>, so C<@DB::args> will contain modifications the
-subroutine makes to C<@_> or its contents, not the original values at call
-time. C<@DB::args>, like C<@_>, does not hold explicit references to its
-elements, so under certain cases its elements may have become freed and
-reallocated for other variables or temporary values. Finally, a side effect
-of the current implementation means that the effects of C<shift @_> can
-I<normally> be undone (but not C<pop @_> or other splicing, and not if a
-reference to C<@_> has been taken, and subject to the caveat about reallocated
-elements), so C<@DB::args> is actually a hybrid of the current state and
-initial state of C<@_>. Buyer beware.
-(TBT)
+C<@DB::args> の設定は I<ベストエフォート> で、デバッグやバックトレースの
+生成を目的としていて、これに依存するべきではないということにも
+注意してください。
+特に、C<@_> は呼び出し元の引数へのエイリアスを含んでいるので、Perl は
+C<@_> のコピーを取らず、従って C<@DB::args> はサブルーチンが
+C<@_> やその内容に行った変更を含んでいて、呼び出し時の元の値ではありません。
+C<@DB::args> は、C<@_> と同様、その要素への明示的なリファレンスを
+保持しないので、ある種の状況では、解放されて他の変数や一時的な値のために
+再割り当てされているかもしれません。
+最後に、現在の実装の副作用は、C<shift @_> の効果は I<普通は> 行われない
+(しかし C<pop @_> やその他の splice は違い、そしてもし
+C<@_> のリファレンスが取られると、再割り当てされた要素に関する
+問題になりやすいです)ことを意味するので、C<@DB::args> は実際には現在の状態と
+C<@_> の初期状態との合成物となります。
+ご用心を。
 
 =item chdir EXPR
 X<chdir>
@@ -2633,11 +2634,10 @@
 
 =end original
 
-It returns the value or values deleted in list context, or the last such
-element in scalar context.  The return list's length always matches that of
-the argument list: deleting non-existent elements returns the undefined value
-in their corresponding positions.
-(TBT)
+これはリストコンテキストでは削除された要素を返し、スカラコンテキストでは
+削除された要素のうち最後のものを返します。
+返されたリストの長さは常に引数リストの長さと一致します:
+存在しない要素を削除すると、対応する位置に未定義値をセットして返します。
 
 =begin original
 
@@ -2650,13 +2650,13 @@
 
 =end original
 
-delete() may also be used on arrays and array slices, but its behavior is less
-straightforward.  Although exists() will return false for deleted entries,
-deleting array elements never changes indices of existing values; use shift()
-or splice() for that.  However, if all deleted elements fall at the end of an
-array, the array's size shrinks to the position of the highest element that
-still tests true for exists(), or to 0 if none do.
-(TBT)
+delete() は配列や配列のスライスに対しても使えますが、その振る舞いは
+あまり直感的ではありません。
+削除されたエントリに対しては exists() は偽を返しますが、
+配列要素を削除しても、存在する値の添え字は変わりません; このためには
+shift() や splice() を使ってください。
+しかし、全ての削除された要素が配列の末尾であった場合、配列のサイズは
+exists() が真となる最大位置の要素(それがない場合は 0)に切り詰められます。
 
 =begin original
 
@@ -2693,11 +2693,10 @@
 
 =end original
 
-The C<delete local EXPR> construct localizes the deletion to the current
-block at run time.  Until the block exits, elements locally deleted
-temporarily no longer exist.  See L<perlsub/"Localized deletion of elements
-of composite types">.
-(TBT)
+C<delete local EXPR> 構文は、現在のブロックの削除を実行時にローカル化します。
+ブロックから出るまで、ローカルで削除された要素は存在しなくなります。
+L<perlsub/"Localized deletion of elements of composite types"> を
+参照してください。
 
     %hash = (foo => 11, bar => 22, baz => 33);
     $scalar = delete $hash{foo};             # $scalar is 11
@@ -3883,11 +3882,10 @@
 
 =end original
 
-exists may also be called on array elements, but its behavior is much less
-obvious, and is strongly tied to the use of L</delete> on arrays.  B<Be aware>
-that calling exists on array values is deprecated and likely to be removed in
-a future version of Perl.
-(TBT)
+exists は配列の要素に対しても呼び出せますが、その振る舞いははるかに
+不明確で、配列に対する L</delete> の使用と強く結びついています。
+配列の値に対して exists を呼び出すのは非推奨であり、将来のバージョンの
+Perl では削除されるかもしれないことを B<注意してください> 。
 
     print "Exists\n"    if exists $array[$index];
     print "Defined\n"   if defined $array[$index];
@@ -5140,11 +5138,10 @@
 
 =end original
 
-If non-empty braces are the only wildcard characters used in the
-C<glob>, no filenames are matched, but potentially many strings
-are returned.  For example, this produces nine strings, one for
-each pairing of fruits and colors:
-(TBT)
+空でない中かっこが C<glob> で使われている唯一のワイルドカード文字列の
+場合、ファイル名とはマッチングせず、可能性のある文字列が返されます。
+例えば、これは 9 個の文字列を生成し、それぞれは果物と色の組み合わせに
+なります:
 
     @many =  glob "{apple,tomato,cherry}={green,yellow,red}";
 
@@ -5253,12 +5250,11 @@
 
 =end original
 
-Use of C<goto-LABEL> or C<goto-EXPR> to jump into a construct is
-deprecated and will issue a warning.  Even then, it may not be used to
-go into any construct that requires initialization, such as a
-subroutine or a C<foreach> loop.  It also can't be used to go into a
-construct that is optimized away.
-(TBT)
+構造の中に飛び込むために C<goto-LABEL> や C<goto-EXPR> を使うことは
+非推奨で、警告が発生します。
+それでも、サブルーチンや C<foreach> ループのような、初期化が必要な
+構造の中に入るために使うことは出来ません。
+また、最適化してなくなってしまった構造の中へ入るために使うことも出来ません。
 
 =begin original
 
@@ -5796,14 +5792,12 @@
 =end original
 
 SIGNAL がゼロの場合、プロセスにシグナルは送られませんが、
-but C<kill>
-checks whether it's I<possible> to send a signal to it (that
-means, to be brief, that the process is owned by the same user, or we are
-the super-user).
+C<kill> は、シグナルを送ることが I<可能> かどうかを調べます
+(これは、簡単に言うと、プロセスが同じユーザーに所有されているか、
+自分がスーパーユーザーであることを意味します)。
 これは子プロセスが(ゾンビとしてだけでも)まだ生きていて、 UID が
 変わっていないことを調べる時に有用です。
 この構成の移植性に関する注意については L<perlport> を参照して下さい。
-(TBT)
 
 =begin original
 
@@ -6112,11 +6106,10 @@
 
 全ての 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).
+UTF-8 でエンコードされた文字列が何バイトかを知るには、
+C<length(Encode::encode_utf8(EXPR))> を使ってください (先に
+C<use Encode> する必要があります)。
 L<Encode> と L<perlunicode> を参照してください。
-(TBT)
 
 =item link OLDFILE,NEWFILE
 X<link>
@@ -6184,11 +6177,10 @@
 
 =end original
 
-The C<delete local EXPR> construct can also be used to localize the deletion
-of array/hash elements to the current block.
+C<delete local EXPR> 構文は、配列/ハッシュの要素の削除を現在の
+ブロックにローカル化するためにも使われていました。
 L<perlsub/"Localized deletion of elements of composite types"> を
 参照してください。
-(TBT)
 
 =item localtime EXPR
 X<localtime> X<ctime>
@@ -6965,10 +6957,8 @@
 
 =end original
 
-Leading white space is ignored without warning, as too are any trailing 
-non-digits, such as a decimal point (C<oct> only handles non-negative
-integers, not negative integers or floating point).
-(TBT)
+先頭の空白や、末尾の(小数点のような)非数字は警告なしに無視されます
+(C<oct> は非負整数のみを扱えます; 負の整数や小数は扱えません)。
 
 =item open FILEHANDLE,EXPR
 X<open> X<pipe> X<file, open> X<fopen>
@@ -8361,12 +8351,16 @@
 
 =item * 
 
+=begin original
+
 C<u>, where it is equivalent to 1 (or 45, which here is equivalent).
 
-=back 
+=end original
 
 C<u> では 1 (あるいはここでは 45 でも等価です) と等価です。
 
+=back 
+
 =begin original
 
 One can replace a numeric repeat count with a template letter enclosed in
@@ -8715,10 +8709,8 @@
 
 C</> テンプレート文字は、アイテムの数の後にアイテムそのものが入っている形の
 アイテム列を pack 及び unpack します。
-This is useful when the structure you're
-unpacking has encoded the sizes or repeat counts for some of its fields
-within the structure itself as separate fields.
-(TBT)
+これは、unpack したい構造体が、サイズや繰り替え指数が構造体自身の中に
+独立したフィールドとしてエンコードされている場合に有効です。
 
 =begin original
 
@@ -9302,11 +9294,9 @@
 TEMPLATE の中の C<#> から行末まではコメントです。
 空白は pack コードをそれぞれ分けるために使えますが、修飾子と
 繰り返し数は直後に置かなければなりません。
-Breaking complex templates into
-individual line-by-line components, suitably annotated, can do as much to
-improve legibility and maintainability of pack/unpack formats as C</x> can
-for complicated pattern matches.
-(TBT)
+複雑なテンプレートを個々の行単位の要素に分解して適切に注釈をつけると、
+複雑なパターンマッチングに対する C</x> と同じぐらい、pack/unpack
+フォーマットの読みやすさと保守性が向上します。
 
 =item *
 
@@ -9463,13 +9453,13 @@
 
 =end original
 
-If VERSION is provided, C<package> sets the C<$VERSION> variable in the given
-namespace to a L<version> object with the VERSION provided.  VERSION must be a
-"strict" style version number as defined by the L<version> module: a positive
-decimal number (integer or decimal-fraction) without exponentiation or else a
-dotted-decimal v-string with a leading 'v' character and at least three
-components.  You should set C<$VERSION> only once per package.
-(TBT)
+VERSION が指定されると、C<package> は与えられた名前空間の C<$VERSION> 変数に、
+指定された VERSION の L<version> オブジェクトをセットします。
+VERSION は L<version> で定義されている「厳密な」形式のバージョン番号で
+なければなりません: 指数のない正の 10 進数 (整数か 10 進小数) か、
+さもなければ先頭に 'v' の文字が付いて、少なくとも 3 つの部分から
+構成されるドット付き 10 進v-文字列です。
+C<$VERSION> はパッケージ毎に 1 回だけセットするべきです。
 
 =begin original
 
@@ -9663,7 +9653,7 @@
 
 =end original
 
-Printing to a closed pipe or socket will generate a SIGPIPE signal.
+閉じたパイプやソケットに print すると SIGPIPE シグナルが生成されます。
 さらなるシグナル操作については L<perlipc> を参照してください。
 
 =item printf FILEHANDLE FORMAT, LIST
@@ -9833,11 +9823,10 @@
 
 =end original
 
-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.
+クォートメタ (と C<\Q> ... C<\E>) は、文字列を正規表現に展開するのに
+便利です; なぜなら、デフォルトでは展開された変数は小さな正規表現として
+扱われるからです。
 例えば:
-(TBT)
 
     my $sentence = 'The quick brown fox jumped over the lazy dog';
     my $substring = 'quick.*?fox';
@@ -10156,10 +10145,10 @@
 
 =end original
 
-Note that you have can't handle C<readline> errors that way with the
-C<ARGV> filehandle. In that case, you have to open each element of
-C<@ARGV> yourself since C<eof> handles C<ARGV> differently.
-(TBT)
+C<readline> のエラーは C<ARGV> ファイルハンドルの方法では扱えないことに
+注意してください。
+この場合、C<eof> は C<ARGV> を異なった方法で扱うので、
+C<@ARGV> のそれぞれの要素を自分でオープンする必要があります。
 
     foreach my $arg (@ARGV) {
         open(my $fh, $arg) or warn "Can't open $arg: $!";
@@ -10999,10 +10988,10 @@
 
 =end original
 
-Note that reversing an array to itself (as in C<@a = reverse @a>) will
-preserve non-existent elements whenever possible, i.e., for non magical
-arrays or tied arrays with C<EXISTS> and C<DELETE> methods.
-(TBT)
+(C<@a = reverse @a> のように) 反転した配列を自分自身に代入すると、
+存在しない要素は可能なら(つまりマジカルでない配列や
+C<EXISTS> と C<DELETE> メソッドがある tie された配列)
+いつでも保存されることに注意してください。
 
 =begin original
 
@@ -12862,6 +12851,8 @@
 
 Perl の C<sprintf> は以下の一般に知られている変換に対応しています:
 
+=begin original
+
    %%    a percent sign
    %c    a character with the given number
    %s    a string
@@ -12873,6 +12864,19 @@
    %f    a floating-point number, in fixed decimal notation
    %g    a floating-point number, in %e or %f notation
 
+=end original
+
+   %%    パーセントマーク
+   %c    与えられた番号の文字
+   %s    文字列
+   %d    符号付き 10 進数
+   %u    符号なし 10 進数
+   %o    符号なし 8 進数
+   %x    符号なし 16 進数
+   %e    科学的表記の浮動小数点数
+   %f    固定 10 進数表記の浮動小数点数
+   %g    %e か %f の表記の浮動小数点数
+
 =begin original
 
 In addition, Perl permits the following widely-supported conversions:
@@ -12881,6 +12885,8 @@
 
 さらに、Perl では以下のよく使われている変換に対応しています:
 
+=begin original
+
    %X    like %x, but using upper-case letters
    %E    like %e, but using an upper-case "E"
    %G    like %g, but with an upper-case "E" (if applicable)
@@ -12890,6 +12896,16 @@
    %n    special: *stores* the number of characters output so far
         into the next variable in the parameter list
 
+=end original
+
+   %X    %x と同様だが大文字を使う
+   %E    %e と同様だが大文字の "E" を使う
+   %G    %g と同様だが(適切なら)大文字の "E" を使う
+   %b    符号なし 2 進数
+   %B    %b と同様だが、# フラグで大文字の "B" を使う
+   %p    ポインタ (Perl の値のアドレスを 16 進数で出力する)
+   %n    特殊: 出力文字数を引数リストの次の変数に「格納」する
+
 =begin original
 
 Finally, for backward (and we do mean "backward") compatibility, Perl
@@ -12900,12 +12916,22 @@
 最後に、過去との互換性(これは「過去」だと考えています)のために、
 Perl は以下の不要ではあるけれども広く使われている変換に対応しています。
 
+=begin original
+
    %i    a synonym for %d
    %D    a synonym for %ld
    %U    a synonym for %lu
    %O    a synonym for %lo
    %F    a synonym for %f
 
+=end original
+
+   %i    %d の同義語
+   %D    %ld の同義語
+   %U    %lu の同義語
+   %O    %lo の同義語
+   %F    %f の同義語
+
 =begin original
 
 Note that the number of exponent digits in the scientific notation produced
@@ -12939,6 +12965,8 @@
 
 =item format parameter index
 
+(フォーマットパラメータインデックス)
+
 =begin original
 
 An explicit format parameter index, such as C<2$>. By default sprintf
@@ -12947,16 +12975,17 @@
 
 =end original
 
-An explicit format parameter index, such as C<2$>. By default sprintf
-will format the next unused argument in the list, but this allows you
-to take the arguments out of order:
-(TBT)
+C<2$> のような明示的なフォーマットパラメータインデックス。
+デフォルトでは sprintf はリストの次の使われていない引数を
+フォーマットしますが、これによって異なった順番の引数を使えるようにします:
 
   printf '%2$d %1$d', 12, 34;      # prints "34 12"
   printf '%3$d %d %1$d', 1, 2, 3;  # prints "3 1 1"
 
 =item flags
 
+(フラグ)
+
 =begin original
 
 one or more of:
@@ -12965,6 +12994,8 @@
 
 以下のうちの一つまたは複数指定できます:
 
+=begin original
+
    space   prefix non-negative number with a space
    +       prefix non-negative number with a plus sign
    -       left-justify within the field
@@ -12973,6 +13004,16 @@
            prefix non-zero hexadecimal with "0x" or "0X",
            prefix non-zero binary with "0b" or "0B"
 
+=end original
+
+   space   非負数の前に空白をつける
+   +       非負数の前にプラス記号をつける
+   -       フィールド内で左詰めする
+   0       右詰めに空白ではなくゼロを使う
+   #       8 進数では確実に先頭に "0" をつける;
+           非 0 の 16 進数では "0x" か "0X" をつける;
+           非 0 の 2 進数では "0b" か "0B" をつける
+
 =begin original
 
 For example:
@@ -13021,6 +13062,8 @@
 
 =item vector flag
 
+(ベクタフラグ)
+
 =begin original
 
 This flag tells Perl to interpret the supplied string as a vector of
@@ -13067,6 +13110,8 @@
 
 =item (minimum) width
 
+((最小)幅)
+
 =begin original
 
 Arguments are usually formatted to be only as wide as required to
@@ -13099,6 +13144,8 @@
 =item precision, or maximum width
 X<precision>
 
+(精度あるいは最大幅)
+
 =begin original
 
 You can specify a precision (for numeric conversions) or a maximum
@@ -13226,6 +13273,8 @@
 
 =item size
 
+(サイズ)
+
 =begin original
 
 For numeric conversions, you can specify the size to interpret the
@@ -13339,6 +13388,8 @@
 
 =item order of arguments
 
+(引数の順序)
+
 =begin original
 
 Normally, sprintf() takes the next unused argument as the value to
@@ -15917,12 +15968,10 @@
 
 C<use> はコンパイル時に有効なので、コードがコンパイルされる際の通常の
 流れ制御には従いません。
-In particular, putting
-a C<use> inside the false branch of a conditional doesn't prevent it
-from being processed.
+特に、条件文のうち成立しない側の中に C<use> を書いても、
+処理を妨げられません。
 モジュールやプラグマを条件付きでのみ読み込みたい場合、
 L<if> プラグマを使って実現できます:
-(TBT)
 
     use if $] < 5.008, "utf8";
     use if WANT_WARNINGS, warnings => qw(all);
@@ -16108,15 +16157,13 @@
 副作用として、values() を呼び出すと HASH や ARRAY の内部反復子を
 リセットします:
 C</each> を参照してください。
-特に、values() を無効コンテキストで呼び出すとその他のオーバーヘッドなしで
+(特に、values() を無効コンテキストで呼び出すとその他のオーバーヘッドなしで
 反復子をリセットします。
 反復子をリセットするということを除けば、
 リストコンテキストでの C<values @array> は単なる C<@array> と同じです。
 この目的のためには無効コンテキストで C<keys @array> を使うことを
-お勧めしますが、but reasoned
-that it taking C<values @array> out would require more documentation than
-leaving it in.)
-(TBT)
+お勧めしますが、C<values @array> を取り出すにはそのままにするよりも
+より多くの文書が必要だと判断しました。)
 
 =begin original
 
@@ -16804,7 +16851,7 @@
 
 Translate: 吉村 寿人 <JAE00****@nifty*****>
 Update: Kentaro Shirakata <argra****@ub32*****> (5.6.1-)
-License: GPL or Artistic
+License: same as Perl
 
 =end meta
 



perldocjp-cvs メーリングリストの案内
Back to archive index