1LWP::Debug(3)         User Contributed Perl Documentation        LWP::Debug(3)
2
3
4

NAME

6       LWP::Debug - deprecated
7

DESCRIPTION

9       This module has been deprecated.  Please see LWP::ConsoleLogger for
10       your debugging needs.
11
12       LWP::Debug is used to provide tracing facilities, but these are not
13       used by LWP any more.  The code in this module is kept around
14       (undocumented) so that 3rd party code that happens to use the old
15       interfaces continue to run.
16
17       One useful feature that LWP::Debug provided (in an imprecise and
18       troublesome way) was network traffic monitoring.  The following section
19       provides some hints about recommended replacements.
20
21   Network traffic monitoring
22       The best way to monitor the network traffic that LWP generates is to
23       use an external TCP monitoring program.  The WireShark
24       <http://www.wireshark.org/> program is highly recommended for this.
25
26       Another approach it to use a debugging HTTP proxy server and make LWP
27       direct all its traffic via this one.  Call "$ua->proxy" to set it up
28       and then just use LWP as before.
29
30       For less precise monitoring needs just setting up a few simple handlers
31       might do.  The following example sets up handlers to dump the request
32       and response objects that pass through LWP:
33
34         use LWP::UserAgent;
35         $ua = LWP::UserAgent->new;
36         $ua->default_header('Accept-Encoding' => scalar HTTP::Message::decodable());
37
38         $ua->add_handler("request_send",  sub { shift->dump; return });
39         $ua->add_handler("response_done", sub { shift->dump; return });
40
41         $ua->get("http://www.example.com");
42

SEE ALSO

44       LWP::ConsoleLogger, LWP::ConsoleLogger::Everywhere, LWP::UserAgent
45
46
47
48perl v5.34.1                      2022-06-16                     LWP::Debug(3)
Impressum