Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 45491
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: MSCHILLI [...] cpan.org
Cc:
AdminCc:

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



Subject: noproxy option throws off LWP::UserAgent (patch provided)
As documented, the "noproxy" option in WWW::Mechanize prevents env_proxy() from being called: use WWW::Mechanize; my $ua = WWW::Mechanize->new( noproxy => 1, ); But WWW::Mechanize then passes it on to its super class LWP::UserAgent, which barfs on it: Unrecognized LWP::UserAgent options: noproxy at ./test.pl line 10 The attached patch fixes this by not passing the option to LWP::UserAgent. Would be great if you could apply it. -- Mike
Subject: patch.txt
diff --git a/lib/WWW/Mechanize.pm b/lib/WWW/Mechanize.pm index 4952467..7367089 100644 --- a/lib/WWW/Mechanize.pm +++ b/lib/WWW/Mechanize.pm @@ -219,6 +219,7 @@ sub new { quiet => 0, stack_depth => 8675309, # Arbitrarily humongous stack headers => {}, + noproxy => 0, ); my %passed_parms = @_; @@ -241,7 +242,7 @@ sub new { $self->{$parm} = $mech_parms{$parm}; } $self->{page_stack} = []; - $self->env_proxy() unless $parent_parms{noproxy}; + $self->env_proxy() unless $mech_parms{noproxy}; # libwww-perl 5.800 (and before, I assume) has a problem where # $ua->{proxy} can be undef and clone() doesn't handle it.
Thanks, Mike. Fixed. Future bugs go to http://code.google.com/p/www-mechanize/issues/list, please.
CC: MSCHILLI [...] cpan.org
Subject: Re: [rt.cpan.org #45491] noproxy option throws off LWP::UserAgent (patch provided)
Date: Thu, 25 Jun 2009 14:25:15 -0700 (PDT)
To: Andy Lester via RT <bug-WWW-Mechanize [...] rt.cpan.org>
From: Mike Schilli <m [...] perlmeister.com>
On Tue, 23 Jun 2009, Andy Lester via RT wrote: Show quoted text
> Thanks, Mike. Fixed.
Thanks, Andy, for applying the patch! Do you have a release date for the next WWW::Mechanize? Show quoted text
Not on github yet? :) -- Mike Mike Schilli m@perlmeister.com
Subject: Re: [rt.cpan.org #45491] noproxy option throws off LWP::UserAgent (patch provided)
Date: Thu, 25 Jun 2009 16:31:22 -0500
To: bug-WWW-Mechanize [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
Show quoted text
>>
> Thanks, Andy, for applying the patch! Do you have a release date for > the > next WWW::Mechanize? >
Soon. Can you please try the Subversion version and let me know if it works for you? Show quoted text
>> Future bugs go to http://code.google.com/p/www-mechanize/issues/list, >> please.
> > Not on github yet? :)
Nope. No compelling reason to yet. xoa -- Andy Lester => andy@petdance.com => www.theworkinggeek.com => AIM:petdance
CC: MSCHILLI [...] cpan.org
Subject: Re: [rt.cpan.org #45491] noproxy option throws off LWP::UserAgent (patch provided)
Date: Sat, 27 Jun 2009 23:44:53 -0700 (PDT)
To: "andy [...] petdance.com via RT" <bug-WWW-Mechanize [...] rt.cpan.org>
From: Mike Schilli <m [...] perlmeister.com>
On Thu, 25 Jun 2009, andy@petdance.com via RT wrote: Show quoted text
> Soon. Can you please try the Subversion version and let me know if it > works for you?
Works for me, ship it! :) Show quoted text
>> Not on github yet? :)
> Nope. No compelling reason to yet.
Just gave a talk about this at YAPC, hopefully on video soon! :) -- Mike Mike Schilli m@perlmeister.com