=encoding euc-jp =head1 NAME =begin original LWP::Debug - debug routines for the libwww-perl library =end original LWP::Debug - libwww-perl ライブラリのためのデバッグルーチン =head1 SYNOPSIS use LWP::Debug qw(+ -conns); # Used internally in the library LWP::Debug::trace('send()'); LWP::Debug::debug('url ok'); LWP::Debug::conns("read $n bytes: $data"); =head1 DESCRIPTION =begin original LWP::Debug provides tracing facilities. The trace(), debug() and conns() function are called within the library and they log information at increasing levels of detail. Which level of detail is actually printed is controlled with the C function. =end original LWP::Debug はトレース機能を提供します。 trace(), debug(), conns() 関数はライブラリの中で呼ばれ、そして、 この順に増加する詳細レベルで情報をログに出力します。 どの詳細レベルが実際に出力されるかは C 関数により制御されます。 =begin original The following functions are available: =end original 以下の関数を使うことができます: =over 4 =item level(...) =begin original The C function controls the level of detail being logged. Passing '+' or '-' indicates full and no logging respectively. Individual levels can switched on and of by passing the name of the level with a '+' or '-' prepended. The levels are: =end original C 関数はログに出力される詳細レベルを制御します。 '+' を渡すとすべてをログに出力、'-' を渡すとログ出力無しになります。 個々のレベルは、レベルの名前に '+' または '-' をつけて 切り替えることができます。 そのレベルには以下のものがあります: trace : trace function calls debug : print debug messages conns : show all data transfered over the connections =begin original The LWP::Debug module provide a special import() method that allows you to pass the level() arguments with initial use statement. If a use argument start with '+' or '-' then it is passed to the level function, else the name is exported as usual. The following two statements are thus equivalent (if you ignore that the second pollutes your namespace): =end original LWP::Debug モジュールは、初期の use ステートメントで level() 引数を 渡すことを出来るようにする特別な import() メソッドを提供します。 use引数が '+' や '-' で始まっていれば、level 関数に渡されます。 そうでなければその名前は通常通りにエクスポートされます。 このため以下の 2 つのステートメントは同じです (もし 2 番目が名前空間を汚すということを無視すればですが): use LWP::Debug qw(+); use LWP::Debug qw(level); level('+'); =item trace($msg) =begin original The C function is used for tracing function calls. The package and calling subroutine name is printed along with the passed argument. This should be called at the start of every major function. =end original C 関数はトレースする関数を呼び出すために使われます。 パッケージと呼び出しサブルーチン名が渡された引数とともに出力されます。 これはすべての大きな関数が開始するたびに呼ばれるべきです。 =item debug($msg) =begin original The C function is used for high-granularity reporting of state in functions. =end original C 関数は関数での状態の粒度の高い (high-granularity) 報告のために 使われます。 =item conns($msg) =begin original The C function is used to show data being transferred over the connections. This may generate considerable output. =end original C 関数は接続で転送されたデータを表示するために使われます。 これはかなり大量の出力を生成するかもしれません。 =back =begin meta Translated: Hippo2000 (5.48) Updated: Kentaro SHIRAKATA (5.813) =end meta