Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 28597
Status: resolved
Priority: 0/
Queue: libwww-perl

Owner: Nobody in particular
Requestors: FWILES [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)


Subject: PATCH: Detect common user errors
Download (untitled) / with headers
text/plain 395b
Patch to detect if a silly user, like myself, called: LWP::UserAgent->new( { agent => 'foo' } ); instead of the required: LWP::UserAgent->new( agent => 'foo' ); It would also be nice if the options testing code, that checks to make sure only valid options have been given, could be turned on with 'use warnings' in my own code. But I couldn't figure out how to make that work. Thanks!
Subject: lwp-useragent-options.patch
--- libwww-perl-5.807/lib/LWP/ 2007-07-31 16:31:38.000000000 -0500 +++ libwww-perl-original/lib/LWP/ 2006-06-05 03:36:37.000000000 -0500 @@ -32,12 +32,6 @@ sub new { - # Check for common user mistake calling - # LWP::UserAgent->new( { agent => 'foo' } ) instead of - # LWP::UserAgent->new( agent => 'foo' ) - Carp::croak("Options to LWP::UserAgent should be a hash, not reference") - if ref($_[1]) eq 'HASH'; - my($class, %cnf) = @_; LWP::Debug::trace('()');

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to