argra****@users*****
argra****@users*****
2008年 8月 23日 (土) 06:10:14 JST
Index: docs/perl/5.8.8/perldata.pod diff -u docs/perl/5.8.8/perldata.pod:1.5 docs/perl/5.8.8/perldata.pod:1.6 --- docs/perl/5.8.8/perldata.pod:1.5 Sat Jul 12 18:36:46 2008 +++ docs/perl/5.8.8/perldata.pod Sat Aug 23 06:10:14 2008 @@ -27,17 +27,14 @@ =end original -Perl には、スカラ、スカラの配列、「ハッシュ」とも呼ばれるスカラの連想配列と -いう 3 つの組み込みデータ型があります。 -A scalar is a -single string (of any size, limited only by the available memory), -number, or a reference to something (which will be discussed -in L<perlref>). +Perl には、スカラ、スカラの配列、「ハッシュ」とも呼ばれるスカラの +連想配列という 3 つの組み込みデータ型があります。 +スカラは単一の(任意の長さの)文字列(利用可能メモリによってのみ制限されます)か、 +数値か、何かへのリファレンス(これは L<perlref> で議論します)のいずれかです。 通常の配列は 0 を基点とする数値で添え字づけされるスカラの順序付き リストです。 ハッシュ配列は、文字列のキーのインデックスと、それに結び付けられた スカラ値の順序のない集合です。 -(TBT) =begin original Index: docs/perl/5.8.8/perlmod.pod diff -u docs/perl/5.8.8/perlmod.pod:1.3 docs/perl/5.8.8/perlmod.pod:1.4 --- docs/perl/5.8.8/perlmod.pod:1.3 Fri Jan 11 06:00:08 2008 +++ docs/perl/5.8.8/perlmod.pod Sat Aug 23 06:10:14 2008 @@ -49,10 +49,8 @@ または C<eval>、ファイルの最初に現れたものまでです (my() や locla() 演算子のスコープと同じ)。 修飾されていない動的識別子(dynamic identifiers)はその名前空間に -存在するようになりますが、 -except for those few identifiers that if unqualified, -default to the main package instead of the current one as described -below. +存在するようになりますが、例外として以下に述べるように、いくつかの識別子は +修飾されないと現在のパッケージではなく main パッケージに存在します。 パッケージ文は(local() を使った)動的変数にのみ効果を持ちますが、 my() によって生成されたレキシカル変数には影響 I<しません>。 典型的には、これは C<do>, C<require>, C<use> 演算子を使ってインクルードされた @@ -65,7 +63,6 @@ 参照することができます。 パッケージ名が空であれば、C<main> が仮定されます。 つまり、C<$::sail> と C<$main::sail> は等価になります。 -(TBT) =begin original @@ -268,11 +265,10 @@ (上記の 2 行目と C<local $main::foo = $main::The> との B<大きな> 違いに 注意してください。 -The former is accessing the hash -C<%main::>, which is the symbol table of package C<main>. The latter is -simply assigning scalar C<$bar> in package C<main> to scalar C<$foo> of -the same package.) -(TBT) +前者は C<%main::>、つまり C<main> パッケージのシンボルテーブルを +アクセスしています。 +後者は単に C<main> パッケージのスカラ C<$bar> を同じパッケージの +スカラ C<$foo> に代入しています。) =begin original @@ -719,11 +715,9 @@ =end original 文字列の C<eval()> の最後では C<END> コードブロックは実行 B<されない> ことに -注意してください: -if any C<END> code blocks are created in a string C<eval()>, -they will be executed just as any other C<END> code block of that package -in LIFO order just before the interpreter is being exited. -(TBT) +注意してください: 文字列 C<eval()> の中で C<END> コードブロックが +作成されると、これらはこのパッケージのその他の C<END> コードブロックと +同様に、インタプリタが終了する直前に LIFO 順で実行されます。 =begin original @@ -1270,14 +1264,13 @@ C<CLONE> と同様、C<CLONE_SKIP> はパッケージ毎に 1 回呼び出されます; しかし、これはクローン化が開始する直前に、親スレッドのコンテキストで 呼び出されます。 -If it returns a true value, then no objects of that class will -be cloned; or rather, they will be copied as unblessed, undef values. -This provides a simple mechanism for making a module threadsafe; just add -C<sub CLONE_SKIP { 1 }> at the top of the class, and C<DESTROY()> will be -now only be called once per object. Of course, if the child thread needs -to make use of the objects, then a more sophisticated approach is -needed. -(TBT) +これが真の値を返すと、このクラスのオブジェクトはクローン化されません; +厳密に言うと、bless されていない undef 値としてコピーされます。 +これはモジュールをスレッドセーフにする単純な機構を提供します; +単にクラスの先頭に C<sub CLONE_SKIP { 1 }> を追加することで、 +C<DESTROY()> はオブジェクト毎に 1 度だけ呼び出されるようになります。 +もちろん、もし子スレッドがこのオブジェクトを使う必要があるなら、より +洗練された手法が必要です。 =begin original Index: docs/perl/5.8.8/perlxs.pod diff -u docs/perl/5.8.8/perlxs.pod:1.3 docs/perl/5.8.8/perlxs.pod:1.4 --- docs/perl/5.8.8/perlxs.pod:1.3 Tue Nov 20 04:38:43 2007 +++ docs/perl/5.8.8/perlxs.pod Sat Aug 23 06:10:14 2008 @@ -4221,7 +4221,7 @@ =end original -ファイル C<RPC.xs: ONC+ RPC bind ライブラリ関数に対するインターフェース。 +ファイル C<RPC.xs>: ONC+ RPC bind ライブラリ関数に対するインターフェース。 #include "EXTERN.h" #include "perl.h"