latest LWP running under perl -T dies for some values of agent()

Hello,

Would any of the better perl hackers on this list be able to look into  
an issue we are running into with LWP?

the link checker has the issue:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487376
http://qa-dev.w3.org/wlc/checklink?uri=http%3A%2F%2Fwww.w3.org%2F

So does the markup validator:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5988
http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fwww.w3.org%2F;user-agent=1

This seems to only happen with the most recent version of LWP when:
- running as perl -T
- using LWP::UserAgent
- calling $ua->agent(...)
- AND some other factors I have not yet figured out

LWP dies with:
   Software error: Insecure dependency in eval while running with -T  
switch at /usr/local/share/perl/5.10.0/HTTP/Message.pm line 413.

As as quick workaround I was thinking of running the $ua->agent()  
within and eval{} but it is clumsy, and does not quite fix the issue.

I have, however, been so far unable to produce a reduced test case.  
The exact causes of the crash still elude me: for example, the markup  
validator does NOT crash when sending an agent() defined with its  
default string, but does crash whenever passing $q->param('user- 
agent'). Maybe some kind of perl decoding/encoding weirdness, causing  
LWP to consider the string malformed? Hard to tell, really.

If any of you could look into this, it would be very valuable. If not,  
I'll just go with the eval{} and/or deprecate the user-agent override  
functionality.

Thanks,
-- 
olivier

Received on Tuesday, 26 August 2008 13:48:54 UTC