[perldocjp-cvs 209] CVS update: docs/perl/5.6.1

アーカイブの一覧に戻る

argra****@users***** argra****@users*****
2007年 10月 28日 (日) 15:27:51 JST


Index: docs/perl/5.6.1/perldebug.pod
diff -u docs/perl/5.6.1/perldebug.pod:1.9 docs/perl/5.6.1/perldebug.pod:1.10
--- docs/perl/5.6.1/perldebug.pod:1.9	Mon Oct  1 00:28:08 2007
+++ docs/perl/5.6.1/perldebug.pod	Sun Oct 28 15:27:50 2007
@@ -724,6 +724,8 @@
 
 =item O option=value ...
 
+=begin original
+
 Set the value of one or more options.  If the value has internal
 whitespace, it should be quoted.  For example, you could set C<O
 pager="less -MQeicsNfr"> to call B<less> with those specific options.
@@ -734,7 +736,20 @@
 words, you follow single-quoting rules irrespective of the quote;
 eg: C<O option='this isn\'t bad'> or C<O option="She said, \"Isn't
 it?\"">.
-(TBT)
+
+=end original
+
+一つまたは複数のオプションをセットします。
+値自身に空白を含む場合、クォートする必要があります。
+例えば、B<less> をオプション付きで呼び出す場合は
+C<o pager="less -MQeicsNfr"> のようにします。
+シングルクォートとダブルクォートのどちらでも使えますが、クォートする場合は、
+クォート文字と同じ文字はエスケープする必要があります;
+そしてエスケープ文字自身もエスケープして、クォート文字を
+エスケープしているのではないことを示す必要があります。
+言い換えると、クォートに関わりなく、シングルクォートルールに従います;
+例えば: C<o option='this isn\'t bad'> や
+C<o option="She said, \"Isn't it?\"">
 
 =begin original
 
@@ -1074,6 +1089,8 @@
 
 =item man [manpage]
 
+=begin original
+
 Despite its name, this calls your system's default documentation
 viewer on the given page, or on the viewer itself if I<manpage> is
 omitted.  If that viewer is B<man>, the current C<Config> information
@@ -1081,7 +1098,21 @@
 I<manpath>> option.  Failed lookups of the form C<XXX> that match
 known manpages of the form I<perlXXX> will be retried.  This lets
 you type C<man debug> or C<man op> from the debugger.
-(TBT)
+
+=end original
+
+その名前にも関わらず、これは与えられたページ(I<manpage> が省略された
+場合はビューワ自身)に対してシステムのデフォルトのドキュメントビューワを
+呼び出します。
+ビューワが B<man> の場合、適切な MANPATH や S<B<-M> I<manpath>>
+オプションを使って B<man> を起動するために、現在の C<Config> 情報が
+使われます。
+C<XXX> の形で一致する man ページの検索に失敗した場合、
+I<perlXXX> の形のものを再検索します。
+これにより、デバッガから C<man debug> や C<man op> と
+タイプできるようになります。
+
+=begin original
 
 On systems traditionally bereft of a usable B<man> command, the
 debugger invokes B<perldoc>.  Occasionally this determination is
@@ -1092,6 +1123,18 @@
 file, or through direct assignment.  We're still waiting for a
 working example of something along the lines of:
 
+=end original
+
+伝統的に利用可能な B<man> コマンドを奪われたシステムでは、デバッガは<
+B<perldoc> を起動します。
+反抗的なベンダーや、より適切には、積極的なユーザーによって、この判断は
+正しくありません。
+もしあなたがどちらかの分類に当てはまってしまうなら、Perl のドキュメントを
+表示するためにどのビューワを使うかを、手動で $DB::doccmd 変数に
+セットしてください。
+これは rc ファイルででも、直接の代入ででもセットできます。
+私たちは以下のような感じで、実際に動作する例を待っています:
+
     $DB::doccmd = 'netscape -remote http://something.here/';
 
 =back
@@ -1128,13 +1171,23 @@
 
 =item C<pager>
 
+=begin original
+
 Program to use for output of pager-piped commands (those beginning
 with a C<|> character.)  By default, C<$ENV{PAGER}> will be used.
 Because the debugger uses your current terminal characteristics
 for bold and underlining, if the chosen pager does not pass escape
 sequences through unchanged, the output of some debugger commands
 will not be readable when sent through the pager.
-(TBT)
+
+=end original
+
+ページャにパイプされるコマンド(文字 C<|> で始まるもの)の出力に
+使われるプログラム。
+デフォルトでは、C<$ENV{PAGER}> が使われます。
+デバッガは強調と下線に関して現在の端末設定を使うので、もし選択した
+ページャがエスケープシーケンスを変更せずに通過させられない場合、
+一部のデバッガコマンドの出力は、ページャに送られると読めなくなるでしょう。
 
 =item C<tkRunning>
 
@@ -1148,11 +1201,23 @@
 
 =item C<signalLevel>, C<warnLevel>, C<dieLevel>
 
+=begin original
+
 Level of verbosity.  By default, the debugger leaves your exceptions
 and warnings alone, because altering them can break correctly running
 programs.  It will attempt to print a message when uncaught INT, BUS, or
 SEGV signals arrive.  (But see the mention of signals in L<BUGS> below.)
-(TBT)
+
+=end original
+
+詳細さのレベル。
+デフォルトでは、デバッガは例外と警告を放っておきます;
+これを変更すると、プログラムが正しく動かなくなることがあるからです。
+捕捉されていない INT, BUS, SEGV シグナルがあると、メッセージを
+表示しようとします。
+(しかし、以下の L<BUGS> のシグナルに関する注意を参照してください。)
+
+=begin original
 
 To disable this default safe mode, set these values to something higher
 than 0.  At a level of 1, you get backtraces upon receiving any kind
@@ -1167,6 +1232,23 @@
 This may perhaps be useful for some tracing purposes, but tends to hopelessly
 destroy any program that takes its exception handling seriously.
 
+=end original
+
+このデフォルトのセーフモードを無効にするには、これらの値を 0 以上に
+セットしてください。
+レベル 1 では、あらゆる種類の警告(これはしばしばうんざりさせるものです)や
+例外(これはしばしば価値があります)を受信した時にバックトレースを得ます。
+残念ながら、デバッガは致命的な例外と致命的でない例外を識別できません。
+C<dieLevel> は 1 であっても、致命的でない例外もトレースされ、
+それが C<eval された> 文字列からか、読み込もうとしたモジュール内の
+あらゆる種類の C<eval> からのものであるなら、突然置き換えられます。
+C<dieLevel> が 2 なら、デバッガは例外の出所を気にしません:
+例外ハンドラを横取りしてトレースを表示し、それから全ての例外を自身の装飾で
+修正します。
+これはある種のトレースの目的にはおそらく有用ですが、
+例外をまじめに扱っているプログラムをどうしようもなく破壊してしまう傾向が
+あります。
+
 =item C<AutoTrace>
 
 =begin original
@@ -1180,12 +1262,21 @@
 
 =item C<LineInfo>
 
+=begin original
+
 File or pipe to print line number info to.  If it is a pipe (say,
 C<|visual_perl_db>), then a short message is used.  This is the
 mechanism used to interact with a slave editor or visual debugger,
 such as the special C<vi> or C<emacs> hooks, or the C<ddd> graphical
 debugger.
-(TBT)
+
+=end original
+
+行番号情報を記録するファイルまたはパイプ。
+これが (C<|visual_perl_db> のように) パイプの場合、短い文章が使われます。
+これは、特別な C<vi> や C<emacs> のフックや、C<ddd> グラフィカル
+デバッガのようなスレーブエディタやビジュアルデバッガと相互作用するために
+使われる機構です。
 
 =item C<inhibit_exit>
 
@@ -1209,25 +1300,61 @@
 
 =item C<ornaments>
 
+=begin original
+
 Affects screen appearance of the command line (see L<Term::ReadLine>).
 There is currently no way to disable these, which can render
 some output illegible on some displays, or with some pagers.
 This is considered a bug.
 
+=end original
+
+コマンドラインの画面への表示に影響を与えます(L<Term::ReadLine> を
+参照してください)。
+今のところ、これを無効にする方法はありません;
+これにより、ディスプレイやページャーによっては判読できない出力を
+行うことがあります。
+これはバグと考えられています。
+
 =item C<frame>
 
+=begin original
+
 Affects the printing of messages upon entry and exit from subroutines.  If
 C<frame & 2> is false, messages are printed on entry only. (Printing
 on exit might be useful if interspersed with other messages.)
 
+=end original
+
+サブルーチンへの出入り時のメッセージ表示に影響を与えます。
+C<frame & 2> が偽なら、サブルーチンに入る時にのみメッセージを出力します。
+(出るときのメッセージは、他のメッセージがまき散らされているときには
+有用でしょう。)
+
+=begin original
+
 If C<frame & 4>, arguments to functions are printed, plus context
 and caller info.  If C<frame & 8>, overloaded C<stringify> and
 C<tie>d C<FETCH> is enabled on the printed arguments.  If C<frame
 & 16>, the return value from the subroutine is printed.
 
+=end original
+
+C<frame & 4> の場合、関数の引数に加えて、コンテキストと呼び出し元の
+情報を表示します。
+C<frame & 8> の場合、引数の表示にオーバーロードされた C<文字列化> と
+C<tie> した C<FETCH> が有効になります。
+C<frame & 16> の場合、サブルーチンからの返り値が表示されます。
+
+=begin original
+
 The length at which the argument list is truncated is governed by the
 next option:
 
+=end original
+
+引数リストが切り詰められた時の長さは次のオプションの管轄となります:
+
 =item C<maxTraceLen>
 
 =begin original
@@ -1317,18 +1444,35 @@
 
 =item C<quote>, C<HighBit>, C<undefPrint>
 
+=begin original
+
 Change the style of string dump.  The default value for C<quote>
 is C<auto>; one can enable double-quotish or single-quotish format
 by setting it to C<"> or C<'>, respectively.  By default, characters
 with their high bit set are printed verbatim.
-(TBT)
+
+=end original
+
+文字列ダンプのスタイルを変更します。
+C<quote> のデフォルトは C<auto> です;
+C<"> や C<'> にセットすることでダブルクォート風やシングルクォート風に
+できます。
+デフォルトでは、最上位ビットがセットされている文字はそのまま表示されます。
 
 =item C<UsageOnly>
 
+=begin original
+
 Rudimentary per-package memory usage dump.  Calculates total
 size of strings found in variables in the package.  This does not
 include lexicals in a module's file scope, or lost in closures.
-(TBT)
+
+=end original
+
+基本的なパッケージ単位のメモリ使用量ダンプ。
+パッケージ内の変数で見つかった文字列のサイズの合計を計算します。
+モジュールのファイルスコープ内のレキシカルや、クロージャ内で
+失われたものは含まれません。
 
 =back
 
@@ -1385,12 +1529,22 @@
 
 =item C<noTTY>
 
+=begin original
+
 If set, the debugger goes into C<NonStop> mode and will not connect to a TTY.  If
 interrupted (or if control goes to the debugger via explicit setting of
 $DB::signal or $DB::single from the Perl script), it connects to a TTY
 specified in the C<TTY> option at startup, or to a tty found at
 runtime using the C<Term::Rendezvous> module of your choice.
 
+=end original
+
+セットすると、デバッガは C<NonStop> モードとなり、TTY と接続されません。
+もし中断された(または Perl スクリプトから明示的に $DB::signal や
+$DB::single をセットすることによってデバッガに制御が移った)場合、
+起動時に C<TTY> オプションで指定された TTY か、実行時に C<Term::Rendezvous>
+モジュールで選択された TTY に接続されます。
+
 =begin original
 
 This module should implement a method named C<new> that returns an object
@@ -1448,13 +1602,23 @@
 
     $ PERLDB_OPTS="NonStop frame=2" perl -d myprogram
 
+=begin original
+
 That will run the script B<myprogram> without human intervention,
 printing out the call tree with entry and exit points.  Note that
 C<NonStop=1 frame=2> is equivalent to C<N f=2>, and that originally,
 options could be uniquely abbreviated by the first letter (modulo
 the C<Dump*> options).  It is nevertheless recommended that you
 always spell them out in full for legibility and future compatibility.
-(TBT)
+
+=end original
+
+これは、人間の関与なしでスクリプト B<myprogram> を実行し、進入と終了の
+ポイントの呼び出し木を表示します。
+C<NonStop=1 frame=2> は C<N f=2> と等価で、もともとオプションは最初の文字
+(C<Dump*> オプションを法として) に省略できます。
+それでもやはり、読みやすさと将来の互換性のために、常にフルスペルを書くことが
+推奨されます。
 
 =begin original
 
@@ -1466,11 +1630,20 @@
 
     $ PERLDB_OPTS="NonStop frame=2" perl -d myprogram
 
+=begin original
+
 which runs script non-interactively, printing info on each entry
 into a subroutine and each executed line into the file named F<listing>.
 (If you interrupt it, you would better reset C<LineInfo> to something
 "interactive"!)
 
+=end original
+
+とするとスクリプトは非対話的に実行され、サブルーチンへの進入と実行行を
+F<listing> という名前のファイルに記録します。
+(中断すると、何か「対話的」にするために C<LineInfo> をリセットする方が
+良いでしょう!)
+
 =begin original
 
 Other examples include (using standard shell syntax to show environment
@@ -1483,10 +1656,16 @@
   $ ( PERLDB_OPTS="NonStop frame=1 AutoTrace LineInfo=tperl.out"
       perl -d myprogram )
 
+=begin original
+
 which may be useful for debugging a program that uses C<Term::ReadLine>
 itself.  Do not forget to detach your shell from the TTY in the window that
 corresponds to F</dev/ttyXX>, say, by issuing a command like
 
+=end original
+
+
+
   $ sleep 1000000
 
 =begin original
@@ -1525,6 +1704,8 @@
 
     DB<<17>>
 
+=begin original
+
 where that number is the command number, and which you'd use to
 access with the built-in B<csh>-like history mechanism.  For example,
 C<!17> would repeat command number 17.  The depth of the angle
@@ -1533,15 +1714,33 @@
 at a breakpoint and then printed the result of a function call that
 itself has a breakpoint, or you step into an expression via C<s/n/t
 expression> command.
-(TBT)
+
+=end original
+
+ここで数値はコマンド番号で、組み込みの B<csh> 風履歴機構を使って
+アクセスするのに使います。
+例えば、C<!17> はコマンド番号 17 を再実行します。
+不等号の深さはデバッガのネストの深さを示します。
+例えば、既にブレークポイントにいて、それ自身にもブレークポイントを
+含む関数呼び出しの結果を表示させたり、C<s/n/t expression> コマンドを
+使って式をステップ実行したりした時に複数の不等号の組を見ることがあります。
 
 =item Multiline commands
 
+=begin original
+
 If you want to enter a multi-line command, such as a subroutine
 definition with several statements or a format, escape the newline
 that would normally end the debugger command with a backslash.
 Here's an example:
 
+=end original
+
+複数の文からなるサブルーチン定義やフォーマットといった、複数行の
+コマンドを入力したい場合は、通常はデバッガコマンドを終了させる改行を
+バックスラッシュでエスケープしてください。
+以下は例です:
+
       DB<1> for (1..4) {         \
       cont:     print "ok\n";   \
       cont: }
@@ -1576,6 +1775,8 @@
     @ = Ambulation::legs(1, 2, 3, 4) called from file `camel_flea' line 7
     $ = main::pests('bactrian', 4) called from file `camel_flea' line 4
 
+=begin original
+
 The left-hand character up there indicates the context in which the
 function was called, with C<$> and C<@> meaning scalar or list
 contexts respectively, and C<.> meaning void context (which is
@@ -1589,6 +1790,21 @@
 frame shows that C<main::pests> was called in scalar context,
 also from I<camel_flea>, but from line 4.
 
+=end original
+
+上記の左側の文字は関数が呼び出されたコンテキストを示しています;
+C<$> と C<@> はそれぞれスカラコンテキストとリストコンテキストを意味し、
+C<.> は無効コンテキスト(実際のところはスカラコンテキストのようなもの)を
+意味します。
+上記の表示は、スタックダンプを実行したときに C<main::infested> にいて、
+これはファイル I<Ambulation.pm> の 10 行目から、スカラコンテキストで
+引数なしで呼び出されています; つまり C<&infested> のようにして
+呼び出されています。
+次のスタックフレームは、関数 C<Ambulation::legs> が I<camel_flea> から
+リストコンテキストで 4 つの引数と共に呼び出されています。
+最後のスタックフレームは、C<main::pests> が、同じファイル I<camel_flea> の
+4 行目からスカラコンテキストで呼び出されています。
+
 =begin original
 
 If you execute the C<T> command from inside an active C<use>
@@ -1635,11 +1851,21 @@
 C<a> があります。
 今から実行しようとしている行には C<< ==> >> が付いています。
 
+=begin original
+
 Please be aware that code in debugger listings may not look the same
 as your original source code.  Line directives and external source
 filters can alter the code before Perl sees it, causing code to move
 from its original positions or take on entirely different forms.
 
+=end original
+
+デバッガで表示されるコードは、元のソースコードと同じように見えるとは
+限らないことに注意してください。
+行指示子と外部ソースフィルタが、Perl がコードを見る前にコードを
+変更することがあり、それによってコードが元の位置から移動したり、
+完全に異なる形になったりします。
+
 =item Frame listing
 
 =begin original
@@ -1725,12 +1951,21 @@
 
 (デバッガのカスタマイズ)
 
+=begin original
+
 The debugger probably contains enough configuration hooks that you
 won't ever have to modify it yourself.  You may change the behaviour
 of debugger from within the debugger using its C<O> command, from
 the command line via the C<PERLDB_OPTS> environment variable, and
 from customization files.
-(TBT)
+
+=end original
+
+デバッガにはおそらくあなたが自分で修正する必要があるとは思わないような
+ところまで含んだ設定フックがあります。
+デバッガの振る舞いは、デバッガ内で C<o> コマンドを使って変更できます;
+これは C<PERLDB_OPT> 環境変数経由でコマンドラインからか、設定ファイルから
+変更できます。
 
 =begin original
 
@@ -1760,6 +1995,8 @@
 
     parse_options("NonStop=1 LineInfo=db.out AutoTrace=1 frame=2");
 
+=begin original
+
 The code is executed in the package C<DB>.  Note that F<.perldb> is
 processed before processing C<PERLDB_OPTS>.  If F<.perldb> defines the
 subroutine C<afterinit>, that function is called after debugger
@@ -1768,7 +2005,17 @@
 in by Perl and may contain arbitrary commands, for security reasons,
 it must be owned by the superuser or the current user, and writable
 by no one but its owner.
-(TBT)
+
+=end original
+
+コードは C<DB> パッケージで実行されます。
+F<.perldb> は C<PERLDB_OPTS> の前に処理されることに注意してください。
+F<.perldb> で C<afterinit> サブルーチンが定義されていると、この関数は
+デバッガの初期化終了後に呼び出されます。
+F<.perldb> はカレントディレクトリかホームディレクトリに置くことができます。
+このファイルは Perl によって実行され、任意のコマンドを含めることが
+できるので、セキュリティ上の理由から、スーパーユーザーが現在のユーザーに
+よって所有され、所有者以外には書込み禁止になっていなければなりません。
 
 =begin original
 
@@ -1810,13 +2057,24 @@
 
 (readline 対応)
 
+=begin original
+
 As shipped, the only command-line history supplied is a simplistic one
 that checks for leading exclamation points.  However, if you install
 the Term::ReadKey and Term::ReadLine modules from CPAN, you will
 have full editing capabilities much like GNU I<readline>(3) provides.
 Look for these in the F<modules/by-module/Term> directory on CPAN.
 These do not support normal B<vi> command-line editing, however.
-(TBT)
+
+=end original
+
+出荷時の状態では、コマンドライン履歴参照機能として提供されるのは、
+エクスクラメーションマークを付けることによる単純なものだけです。
+しかし、CPAN から Term::ReadKey と Term::ReadLine のモジュールを
+インストールすることで、GNU I<readline>(3) が提供するような
+完全な編集機能が使えるようになります。
+これらは CPAN の F<modules/by-module/Term> ディレクトリにあります。
+しかし、これらは通常の B<vi> コマンドライン編集は対応していません。
 
 =begin original
 
@@ -1846,10 +2104,20 @@
 C デバッガとの連携を連想させるような、Perl デバッガとの統合
 ソフトウェア開発環境を提供します。
 
+=begin original
+
 Perl comes with a start file for making B<emacs> act like a
 syntax-directed editor that understands (some of) Perl's syntax.
 Look in the I<emacs> directory of the Perl source distribution.
 
+=end original
+
+Perl には B<emacs> を Perl の文法(の一部)を解釈する文法指向の
+エディタとして振舞わせるためのスタートファイルを同梱しています。
+Perl ソース配布の I<emacs> ディレクトリを参照してください。
+
+=begin original
+
 A similar setup by Tom Christiansen for interacting with any
 vendor-shipped B<vi> and the X11 window system is also available.
 This works similarly to the integrated multiwindow support that
@@ -1857,13 +2125,37 @@
 time of this writing, however, that tool's eventual location in the
 Perl distribution was uncertain.
 
+=end original
+
+ベンダー同梱の B<vi> および X11 ウィンドウシステムと相互作用させるための
+Tom Christiansen による似たようなセットアップも利用可能です。
+これは B<emacs> が提供する統合マルチウィンドウサポートと同様に動作し、
+デバッガがエディタを制御します。
+しかし、これを記述している時点では、このツールの Perl 配布の中での
+最終的な位置は不確定です。
+
+=begin original
+
 Users of B<vi> should also look into B<vim> and B<gvim>, the mousey
 and windy version, for coloring of Perl keywords.  
 
+=end original
+
+B<vi> ユーザーは、Perl のキーワードを色付けする、マウスとウィンドウ対応の
+B<vim> と B<gvim> を調べてみてください。
+
+=begin original
+
 Note that only perl can truly parse Perl, so all such CASE tools
 fall somewhat short of the mark, especially if you don't program
 your Perl as a C programmer might.
 
+=end original
+
+perl のみが完全に Perl をパースできるので、これら全ての CASE ツールには
+足りないところがあることに注意してください; 特に C プログラマーが書くような
+Perl プログラムを書いていない場合はそうです。
+
 =head2 The Perl Profiler
 
 (Perl プロファイラ)


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