From 2df4ed6146b9fef5c869d920e0068f2c610d915a Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 28 Jul 2012 20:59:37 +0200 Subject: [PATCH] dump LWP with DEBUG=1 --- CouchDB.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CouchDB.pm b/CouchDB.pm index 9512174..9f8cf56 100644 --- a/CouchDB.pm +++ b/CouchDB.pm @@ -15,6 +15,11 @@ sub new { $ua->timeout(10); $ua->env_proxy; + if ( $ENV{DEBUG} ) { + $ua->add_handler("request_send", sub { shift->dump; return }); + $ua->add_handler("response_done", sub { shift->dump; return }); + } + return bless { ua => $ua, host => $host, -- 2.20.1