[perldocjp-cvs 625] CVS update: docs/perl/5.10.1

アーカイブの一覧に戻る

argra****@users***** argra****@users*****
2010年 5月 31日 (月) 05:59:46 JST


Index: docs/perl/5.10.1/perlfaq3.pod
diff -u docs/perl/5.10.1/perlfaq3.pod:1.2 docs/perl/5.10.1/perlfaq3.pod:1.3
--- docs/perl/5.10.1/perlfaq3.pod:1.2	Tue Apr  6 05:07:44 2010
+++ docs/perl/5.10.1/perlfaq3.pod	Mon May 31 05:59:46 2010
@@ -405,10 +405,10 @@
 
 =end original
 
-The C<Devel> namespace has several modules which you can use to
-profile your Perl programs. The C<Devel::DProf> module comes with Perl
-and you can invoke it with the C<-d> switch:
-(TBT)
+C<Devel> 名前空間には Perl プログラムをプロファイルするために使える
+いくつかのモジュールがあります。
+C<Devel::DProf> モジュールは Perl と共に配布されていて、
+C<-d> オプションで起動できます:
 
 	perl -d:DProf program.pl
 
@@ -421,11 +421,10 @@
 
 =end original
 
-After running your program under C<DProf>, you'll get a F<tmon.out> file
-with the profile data. To look at the data, you can turn it into a
-human-readable report with the C<dprofpp> program that comes with
-C<Devel::DProf>.
-(TBT)
+C<DProf> の元でプログラムを動かした後、プロファイルデータとして
+F<tmon.out> ファイルが得られます。
+このデータを見るためには、C<Devel::DProf> と共に配布されている
+C<dprofpp> プログラムで人間が読める形のレポートに変換します。
 
 	dprofpp
 
@@ -436,9 +435,8 @@
 
 =end original
 
-You can also do the profiling and reporting in one step with the C<-p>
-switch to <dprofpp>:
-(TBT)
+また、<dprofpp> に C<-p> オプションを付けることで、プロファイリングと
+レポートを一度に行うことも出来ます:
 
 	dprofpp -p program.pl
 
@@ -450,10 +448,9 @@
 
 =end original
 
-The C<Devel::NYTProf> (New York Times Profiler) does both statement
-and subroutine profiling. It's available from CPAN and you also invoke
-it with the C<-d> switch:
-(TBT)
+C<Devel::NYTProf> (New York Times Profiler) は文とサブルーチンの
+両方のプロファイリングを行います。
+これは CPAN から入手可能で、やはり C<-d> オプションで起動できます:
 
 	perl -d:NYTProf some_perl.pl
 
@@ -465,10 +462,10 @@
 
 =end original
 
-Like C<DProf>, it creates a database of the profile information that you
-can turn into reports. The C<nytprofhtml> command turns the data into
-an HTML report similar to the C<Devel::Cover> report:
-(TBT)
+C<DProf> と同様、レポートに変換できるプロファイル情報のデータベースを
+作成します。
+C<nytprofhtml> コマンドで、データを C<Devel::Cover> レポートと似たような
+HTML レポートに変換します:
 
 	nytprofhtml
 
@@ -480,10 +477,9 @@
 
 =end original
 
-CPAN has several other profilers that you can invoke in the same
-fashion. You might also be interested in using the C<Benchmark> to
-measure and compare code snippets.
-(TBT)
+CPAN には同じ形で起動できるその他のプロファイラもいくつかあります。
+また、コード片を計測、比較するために C<Benchmark> を使うことにも
+興味があるかもしれません。
 
 =begin original
 
@@ -492,9 +488,8 @@
 
 =end original
 
-You can read more about profiling in I<Programming Perl>, chapter 20,
-or I<Mastering Perl>, chapter 5.
-(TBT)
+プロファイルに関するさらなることについては I<Programming Perl> の
+20 章か I<Mastering Perl> の 5 章を読んでください。
 
 =begin original
 
@@ -506,12 +501,11 @@
 
 =end original
 
-L<perldebguts> documents creating a custom debugger if you need to
-create a special sort of profiler. brian d foy describes the process
-in I<The Perl Journal>, "Creating a Perl Debugger",
-http://www.ddj.com/184404522 , and "Profiling in Perl"
-http://www.ddj.com/184404580 .
-(TBT)
+L<perldebguts> には、特別な種類のプロファイラが必要な場合に
+カスタムデバッガを作る方法が書かれています。
+brian d foy は I<The Perl Journal> の "Creating a Perl Debugger",
+http://www.ddj.com/184404522 と "Profiling in Perl"
+http://www.ddj.com/184404580 で処理を記述しています。
 
 =begin original
 
@@ -522,11 +516,10 @@
 
 =end original
 
-Perl.com has two interesting articles on profiling: "Profiling Perl",
-by Simon Cozens, http://www.perl.com/lpt/a/850 and "Debugging and
-Profiling mod_perl Applications", by Frank Wiles,
-http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html .
-(TBT)
+Perl.com にはプロファイリングに関する二つの興味深い記事があります:
+Simon Cozens による "Profiling Perl" http://www.perl.com/lpt/a/850 と
+Frank Wiles による "Debugging and Profiling mod_perl Applications"
+http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html です。
 
 =begin original
 
@@ -538,12 +531,11 @@
 
 =end original
 
-Randal L. Schwartz writes about profiling in "Speeding up Your Perl
-Programs" for I<Unix Review>,
-http://www.stonehenge.com/merlyn/UnixReview/col49.html , and "Profiling
-in Template Toolkit via Overriding" for I<Linux Magazine>,
-http://www.stonehenge.com/merlyn/LinuxMag/col75.html .
-(TBT)
+Randal L. Schwartz はプロファイリングについて
+I<Unix Review> の "Speeding up Your Perl Programs"
+http://www.stonehenge.com/merlyn/UnixReview/col49.html と、
+I<Linux Magazine> の "Profiling in Template Toolkit via Overriding"
+http://www.stonehenge.com/merlyn/LinuxMag/col75.html で書いています。
 
 =head2 How do I cross-reference my Perl programs?
 
Index: docs/perl/5.10.1/perlfaq4.pod
diff -u docs/perl/5.10.1/perlfaq4.pod:1.3 docs/perl/5.10.1/perlfaq4.pod:1.4
--- docs/perl/5.10.1/perlfaq4.pod:1.3	Tue Apr  6 05:07:44 2010
+++ docs/perl/5.10.1/perlfaq4.pod	Mon May 31 05:59:46 2010
@@ -5037,14 +5037,13 @@
 form (for instance, C<HASH(0xDEADBEEF)>). From there you can't get
 back the reference from the stringified form, at least without doing
 some extra work on your own.
-(TBT)
 
 =end original
 
 ハッシュキーは文字列なので、実際にリファレンスをキーとして使うことは
 できません。
 もしそうしようとすると、perl はリファレンスを(例えば C<HASH(0xDEADBEEF)> の
-形に)文字列化 します。
+形に)文字列化します。
 少なくとも自分自身で追加の作業をしない限り、文字列化された形から
 リファレンスを得ることはできません。
 
Index: docs/perl/5.10.1/perlfaq8.pod
diff -u docs/perl/5.10.1/perlfaq8.pod:1.2 docs/perl/5.10.1/perlfaq8.pod:1.3
--- docs/perl/5.10.1/perlfaq8.pod:1.2	Tue Apr  6 05:07:44 2010
+++ docs/perl/5.10.1/perlfaq8.pod	Mon May 31 05:59:46 2010
@@ -335,10 +335,9 @@
 
 =end original
 
-To clear the screen, you just have to print the special sequence
-that tells the terminal to clear the screen. Once you have that
-sequence, output it when you want to clear the screen.
-(TBT)
+画面をクリアするには、端末に画面をクリアするように伝える特殊な
+シーケンスを表示するだけです。
+このシーケンスが分かれば、画面をクリアしたいときにこれを出力します。
 
 =begin original
 
@@ -347,9 +346,9 @@
 
 =end original
 
-You can use the C<Term::ANSIScreen> module to get the special
-sequence. Import the C<cls> function (or the C<:screen> tag):
-(TBT)
+この特殊なシーケンスを得るためには C<Term::ANSIScreen> モジュールが
+使えます。
+C<cls> 関数 (あるいは C<:screen> タグ) をインポートします:
 
 	use Term::ANSIScreen qw(cls);
 	my $clear_screen = cls();
@@ -364,10 +363,9 @@
 
 =end original
 
-The C<Term::Cap> module can also get the special sequence if you want
-to deal with the low-level details of terminal control. The C<Tputs>
-method returns the string for the given capability:
-(TBT)
+端末制御のための低レベルな詳細を扱いたいなら、
+C<Term::Cap> から特殊シーケンスを得られます。
+C<Tputs> メソッドは、与えられた能力のための文字列を返します:
 
 	use Term::Cap;
 
@@ -384,10 +382,9 @@
 
 =end original
 
-On Windows, you can use the C<Win32::Console> module. After creating
-an object for the output filehandle you want to affect, call the
-C<Cls> method:
-(TBT)
+Windows では、C<Win32::Console> モジュールが使えます。
+影響を与えたい出力ファイルハンドルのオブジェクトを作った後、
+C<Cls> メソッドを呼び出します:
 
 	Win32::Console;
 
@@ -404,10 +401,9 @@
 
 =end original
 
-If you have a command-line program that does the job, you can call
-it in backticks to capture whatever it outputs so you can use it
-later:
-(TBT)
+もしこの処理を行うコマンドラインプログラムがあるなら、そのプログラムが
+出力するものを得るために逆クォートで呼び出して、後でそれを使うことも
+できます:
 
 	$clear_string = `clear`;
 
@@ -785,11 +781,11 @@
 
 =end original
 
-There's not a single way to run code in the background so you don't
-have to wait for it to finish before your program moves on to other
-tasks. Process management depends on your particular operating system,
-and many of the techniques are in L<perlipc>.
-(TBT)
+バックグラウンドでコードを実行するための単一の方法というのはないので、
+あなたのプログラムが他のアスクに移動する前に終わるのを待つ必要は
+ありません。
+プロセス管理は使用するオペレーティングシステムに依存していて、
+多くのテクニックは L<perlipc> にあります。
 
 =begin original
 
@@ -800,11 +796,11 @@
 
 =end original
 
-Several CPAN modules may be able to help, including IPC::Open2 or
-IPC::Open3, IPC::Run, Parallel::Jobs, Parallel::ForkManager, POE,
-Proc::Background, and Win32::Process. There are many other modules you
-might use, so check those namespaces for other options too.
-(TBT)
+IPC::Open2, IPC::Open3, IPC::Run, Parallel::Jobs, Parallel::ForkManager,
+POE, Proc::Background, Win32::Process といった CPAN モジュールが
+助けになるでしょう。
+その他にもつかるかもしれない多くのモジュールがありますので、
+これらの名前空間をチェックしてみてください。
 
 =begin original
 
@@ -813,9 +809,8 @@
 
 =end original
 
-If you are on a unix-like system, you might be able to get away with a
-system call where you put an C<&> on the end of the command:
-(TBT)
+unix 風のシステムを使っているなら、コマンドの最後に C<&> を置くことで
+システムコールから切り離すことができるかもしれません:
 
 	system("cmd &")
 
@@ -826,9 +821,8 @@
 
 =end original
 
-You can also try using C<fork>, as described in L<perlfunc> (although
-this is the same thing that many of the modules will do for you).
-(TBT)
+L<perlfunc> に記述されているように、C<fork> を使うこともできます
+(しかしこれは多くのモジュールがやってくれるのと同じことです)。
 
 =over 4
 
@@ -2709,11 +2703,12 @@
 
 =end original
 
-Perl runs C<require> statement at run-time. Once Perl loads, compiles,
-and runs the file, it doesn't do anything else. The C<use> statement
-is the same as a C<require> run at compile-time, but Perl also calls the
-C<import> method for the loaded package. These two are the same:
-(TBT)
+Perl は C<require> 文を実行時に実行します。
+一旦 Perl がロードされ、コンパイルされ、ファイルが実行されると、
+他に何もしません。
+C<use> 文は C<require> と同じことをコンパイル時に行いますが、
+Perl はまたロードされたパッケージの C<import> メソッドを呼び出します。
+以下の二つは同じです:
 
 	use MODULE qw(import list);
 
@@ -2729,9 +2724,9 @@
 
 =end original
 
-However, you can suppress the C<import> by using an explicit, empty
-import list. Both of these still happen at compile-time:
-(TBT)
+しかし、明示的に空のインポートリストを使うことで、C<import> を
+抑制できます。
+これらはどちらもやはりコンパイル時に起こります:
 
 	use MODULE ();
 
@@ -2747,10 +2742,10 @@
 
 =end original
 
-Since C<use> will also call the C<import> method, the actual value
-for C<MODULE> must be a bareword. That is, C<use> cannot load files
-by name, although C<require> can:
-(TBT)
+C<use> は C<import> メソッドの呼び出しも行うので、
+C<MODULE> の実際の値は裸の単語でなければなりません。
+これは、C<use> は名前でファイルをロード出来ませんが、
+C<require> ではできます:
 
 	require "$ENV{HOME}/lib/Foo.pm"; # no @INC searching!
 
@@ -2832,11 +2827,11 @@
 
 =end original
 
-INSTALL_BASE tells these tools to put your modules into
-F</mydir/perl/lib/perl5>.  See L<How do I add a directory to my
-include path (@INC) at runtime?> for details on how to run your newly
-installed moudles.
-(TBT)
+INSTALL_BASE はこれらのツールにモジュールを F</mydir/perl/lib/perl5> に
+置くように伝えます。
+新しくインストールしたモジュールを実行する方法についての詳細は
+L<How do I add a directory to my include path (@INC) at runtime?> を
+参照してください。
 
 =begin original
 
@@ -2850,14 +2845,15 @@
 
 =end original
 
-There is one caveat with INSTALL_BASE, though, since it acts
-differently than the PREFIX and LIB settings that older versions of
-ExtUtils::MakeMaker advocated. INSTALL_BASE does not support
-installing modules for multiple versions of Perl or different
-architectures under the same directory. You should consider if you
-really want that , and if you do, use the older PREFIX and LIB
-settings. See the ExtUtils::Makemaker documentation for more details.
-(TBT)
+しかし、INSTALL_BASE には一つの問題点があります;
+なぜなら、より古いバージョンの ExtUtils::MakeMaker が推奨していた
+PREFIX および LIB とは異なった動作をするからです。
+INSTALL_BASE は、複数のバージョンの Perl や異なったアーキテクチャに
+対して同じディレクトリにモジュールをインストールすることには
+対応していません。
+もし本当にそれが必要でそうするなら、古い PREFIX と LIB の設定を
+考慮するべきです。
+さらなる詳細については ExtUtils::Makemaker の文書を参照してください。
 
 =head2 How do I add the directory my program lives in to the module/library search path?
 
Index: docs/perl/5.10.1/perlfaq9.pod
diff -u docs/perl/5.10.1/perlfaq9.pod:1.2 docs/perl/5.10.1/perlfaq9.pod:1.3
--- docs/perl/5.10.1/perlfaq9.pod:1.2	Tue Apr  6 05:07:44 2010
+++ docs/perl/5.10.1/perlfaq9.pod	Mon May 31 05:59:46 2010
@@ -611,11 +611,11 @@
 
 =end original
 
-Those C<%> encodings handle reserved characters in URIs, as described
-in RFC 2396, Section 2. This encoding replaces the reserved character
-with the hexadecimal representation of the character's number from
-the US-ASCII table. For instance, a colon, C<:>, becomes C<%3A>.
-(TBT)
+これらの C<%> 符号化は RFC 2396 の 2 章に記述されている、
+URI として予約されている文字を扱います。
+この符号化は予約文字を、その文字の番号の 16 進表現に
+US-ASCII テーブルを使って置き換えます。
+例えば、コロン (C<:>) は C<%3A> になります。
 
 =begin original
 
@@ -625,10 +625,9 @@
 
 =end original
 
-In CGI scripts, you don't have to worry about decoding URIs if you are
-using C<CGI.pm>. You shouldn't have to process the URI yourself,
-either on the way in or the way out.
-(TBT)
+CGI スクリプトでは、C<CGI.pm> を使っているなら URL のデコードについて
+気にする必要はありません。
+エンコードにしてもデコードにしても、URI を自分で処理する必要はないはずです。
 
 =begin original
 
@@ -640,12 +639,12 @@
 
 =end original
 
-If you have to encode a string yourself, remember that you should
-never try to encode an already-composed URI. You need to escape the
-components separately then put them together. To encode a string, you
-can use the the C<URI::Escape> module. The C<uri_escape> function
-returns the escaped string:
-(TBT)
+もし文字列を自分でエンコードする必要があるなら、
+決してすでに構成された URI をエンコードするべきではないことを
+忘れないでください。
+要素を別々にエスケープして、それから全てを合わせます。
+文字列をエンコードするには、C<URI::Escape> モジュールが使えます。
+C<uri_escape> 関数はエスケープされた文字列を返します:
 
 	my $original = "Colon : Hash # Percent %";
 
@@ -659,8 +658,7 @@
 
 =end original
 
-To decode the string, use the C<uri_unescape> function:
-(TBT)
+文字列をデコードするには、C<uri_unescape> 関数を使います:
 
 	my $unescaped = uri_unescape( $escaped );
 
@@ -674,10 +672,8 @@
 
 =end original
 
-If you wanted to do it yourself, you simply need to replace the
-reserved characters with their encodings. A global substitution
-is one way to do it:
-(TBT)
+もしこれを自分でするなら、単に予約文字をエンコードされた物に置き換えます。
+全体を一度に変換するなら、以下のようにします:
 
 	# encode
 	$string =~ s/([^^A-Za-z0-9\-_.!~*'()])/ sprintf "%%%0x", ord $1 /eg;



perldocjp-cvs メーリングリストの案内
アーカイブの一覧に戻る