=encoding utf-8 =head1 NAME =begin original LWP::Debug - deprecated =end original LWP::Debug - 非推奨 =head1 DESCRIPTION =begin original LWP::Debug used to provide tracing facilities, but these are not used by LWP any more. The code in this module is kept around (undocumented) so that 3rd party code that happen to use the old interfaces continue to run. =end original LWP::Debug はトレース機能を提供するために使われていましたが、 これらはもはや LWP によって使われなくなくなりました。 このモジュールのコードは(文書化されずに)維持されているため、 たまたま古いインターフェイスを使用するサードパーティのコードは 動作し続けます。 =begin original One useful feature that LWP::Debug provided (in an imprecise and troublesome way) was network traffic monitoring. The following section provide some hints about recommened replacements. =end original LWP::Debug が(不正確で厄介な方法で)提供した便利な機能の一つは、 ネットワークトラフィックの監視でした。 次の節では、推奨される置き換え方についてのヒントを示します。 =head2 Network traffic monitoring (ネットワークトラフィック監視) =begin original The best way to monitor the network traffic that LWP generates is to use an external TCP monitoring program. The Wireshark program (L) is higly recommended for this. =end original LWP が生成するネットワークトラフィックを監視する最良の方法は、 外部 TCP 監視プログラムを使うことです。 このためには、Wireshark プログラム (L) を お勧めします。 =begin original Another approach it to use a debugging HTTP proxy server and make LWP direct all its traffic via this one. Call C<< $ua->proxy >> to set it up and then just use LWP as before. =end original もう一つの手法は、デバッグ用の HTTP プロキシサーバを使って、 LWP がすべてのトラフィックをこのプロキシサーバ経由で 送信するようにすることです。 C<< $ua->proxy >> を呼び出して設定し、前と同じように LWP を使用します。 =begin original For less precise monitoring needs just setting up a few simple handlers might do. The following example sets up handlers to dump the request and response objects that pass through LWP: =end original より精度の低い監視でよい場合は、いくつかの単純なハンドラを 設定するだけで十分です。 次の例では、LWP を通過するリクエストオブジェクトとレスポンスオブジェクトを ダンプするハンドラを設定します。 use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->default_header('Accept-Encoding' => scalar HTTP::Message::decodable()); $ua->add_handler("request_send", sub { shift->dump; return }); $ua->add_handler("response_done", sub { shift->dump; return }); $ua->get("http://www.example.com"); =head1 SEE ALSO L =begin meta Translate: SHIRAKATA Kentaro Status: completed =end meta