{
    "mode": "perldoc",
    "parameter": "LWP::Debug",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/LWP%3A%3ADebug/json",
    "generated": "2026-06-12T22:34:06Z",
    "sections": {
        "NAME": {
            "content": "LWP::Debug - deprecated\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module has been deprecated. Please see LWP::ConsoleLogger for your debugging needs.\n\nLWP::Debug is used to provide tracing facilities, but these are not used by LWP any more. The\ncode in this module is kept around (undocumented) so that 3rd party code that happens to use the\nold interfaces continue to run.\n\nOne useful feature that LWP::Debug provided (in an imprecise and troublesome way) was network\ntraffic monitoring. The following section provides some hints about recommended replacements.\n",
            "subsections": [
                {
                    "name": "Network traffic monitoring",
                    "content": "The best way to monitor the network traffic that LWP generates is to use an external TCP\nmonitoring program. The WireShark <http://www.wireshark.org/> program is highly recommended for\nthis.\n\nAnother approach it to use a debugging HTTP proxy server and make LWP direct all its traffic via\nthis one. Call \"$ua->proxy\" to set it up and then just use LWP as before.\n\nFor less precise monitoring needs just setting up a few simple handlers might do. The following\nexample sets up handlers to dump the request and response objects that pass through LWP:\n\nuse LWP::UserAgent;\n$ua = LWP::UserAgent->new;\n$ua->defaultheader('Accept-Encoding' => scalar HTTP::Message::decodable());\n\n$ua->addhandler(\"requestsend\",  sub { shift->dump; return });\n$ua->addhandler(\"responsedone\", sub { shift->dump; return });\n\n$ua->get(\"http://www.example.com\");\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "LWP::ConsoleLogger, LWP::ConsoleLogger::Everywhere, LWP::UserAgent\n",
            "subsections": []
        }
    },
    "summary": "LWP::Debug - deprecated",
    "flags": [],
    "examples": [],
    "see_also": []
}