Amoe has asked for the wisdom of the Perl Monks concerning the following question:
I have a script that gets stuff from the web. It sends the "referer" header with its requests, which are accomplished using HTTP::Request and LWP::UserAgent. Most of the time it works fine. But sometimes I get this error:
Unexpected field value http://www.referer.com/referer.html at /blah/blah/perl/site/lib/HTTP/Message.pm
Since I don't know what line of the program this is getting called at, I'm having trouble pinning down the error. I would use the debugger, but the errors seem to be random.
And seeing as line 189 yields a very informative $self->{'_headers'}->$method(@_);, I'm stuck as to how to cure this problem.
Any help would be much appreciated.
Re (tilly) 1: HTTP::Message
by tilly (Archbishop) on Aug 26, 2001 at 02:38 UTC
|
use Carp 'verbose';
That won't fix anything, but it will give you a
complete stack backtrace into your code, and you can
figure out what is going on from there.
PS: There is discussion at Are debuggers good? both pro and con
on using debuggers for debugging. You might find it an
interesting read. | [reply] [d/l] |
|