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

NAME

6       LWP::Debug - deprecated
7

DESCRIPTION

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

SEE ALSO

41       LWP::UserAgent
42
43
44
45perl v5.12.4                      2009-06-15                     LWP::Debug(3)
Impressum