Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

LWP::Debug

Name LWP::Debug
Version 6.61
Located at /usr/local/share/perl5
File /usr/local/share/perl5/LWP/Debug.pm
Is Core No
Search CPAN for this module LWP::Debug
Documentation LWP::Debug
Module Details LWP::Debug


NAME

LWP::Debug - deprecated


DESCRIPTION

This module has been deprecated. Please see the LWP::ConsoleLogger manpage for your debugging needs.

LWP::Debug is 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 happens to use the old interfaces continue to run.

One useful feature that LWP::Debug provided (in an imprecise and troublesome way) was network traffic monitoring. The following section provides some hints about recommended replacements.

Network traffic monitoring

The best way to monitor the network traffic that LWP generates is to use an external TCP monitoring program. The WireShark program is highly recommended for this.

Another approach it to use a debugging HTTP proxy server and make LWP direct all its traffic via this one. Call $ua->proxy to set it up and then just use LWP as before.

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:

  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";);


SEE ALSO

the LWP::ConsoleLogger manpage, the LWP::ConsoleLogger::Everywhere manpage, the LWP::UserAgent manpage

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024