Skip Menu |

This queue is for tickets about the Reddit-Client CPAN distribution.

Report information
The Basics
Id: 111445
Status: open
Priority: 0/
Queue: Reddit-Client

People
Owner: EARTHTONE [...] cpan.org
Requestors: perl [...] miggy.org
Cc:
AdminCc:

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



Subject: user_agent passed incorrectly to LWP::UserAgent->new() in Reddit/Client/Request.pm
Date: Tue, 26 Jan 2016 17:17:08 +0000
To: bug-Reddit-Client [...] rt.cpan.org
From: Athanasius <perl [...] miggy.org>
Using v1.076 freshly installed via cpanp. The call to LWP::UserAgent->new() in send() correctly maps $self{user_agent} to the 'agent' parameter, but the call in token_request() at line 108 does not, it still has: my $ua = LWP::UserAgent->new(user_agent => $useragent); Changing this to: my $ua = LWP::UserAgent->new(agent => $useragent); resolves: "Unrecognized LWP::UserAgent options: user_agent at /usr/local/share/perl/5.14.2/Reddit/Client/Request.pm line 108." -- - Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/ Finger athan(at)fysh.org for PGP key "And it's me who is my enemy. Me who beats me up. Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
What's your version of LWP::UserAgent? I've never gotten that error, but, I also just went into LWP/UserAgent.pm directly, and the word "unrecognized" doesn't appear anywhere. So it may be new. I'm guessing what happened is that the user agent is actually being ignored because it's the wrong parameter, and a new version of LWP::UserAgent checks for that.
Subject: Re: [rt.cpan.org #111445] user_agent passed incorrectly to LWP::UserAgent->new() in Reddit/Client/Request.pm
Date: Tue, 26 Jan 2016 17:59:47 +0000
To: Matthew Sobecky via RT <bug-Reddit-Client [...] rt.cpan.org>
From: Athanasius <perl [...] miggy.org>
On Tue, Jan 26, 2016 at 12:31:16PM -0500, Matthew Sobecky via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=111445 > > > What's your version of LWP::UserAgent? I've never gotten that error, but, I also just went into LWP/UserAgent.pm directly, and the word "unrecognized" doesn't appear anywhere. So it may be new.
Looks to be 6.04, which if anything is likely old as that's from a Debian wheezy package. cpan appears to have 6.15 currently. In this version it appears to be the following line: /usr/share/perl5/LWP/UserAgent.pm:93: Carp::carp("Unrecognized LWP::UserAgent options: @{[sort keys %cnf]}"); Show quoted text
> I'm guessing what happened is that the user agent is actually being ignored because it's the wrong parameter, and a new version of LWP::UserAgent checks for that.
Yup. And as I said, the correct version is used elsewhere in Reddit/Client/Request.pm. -- - Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/ Finger athan(at)fysh.org for PGP key "And it's me who is my enemy. Me who beats me up. Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
Ok, thanks. I've already made the change locally and will leave it there for a while to see if it bothers any of my Reddit::Client scripts, and will upload it later if it doesn't. (I doubt it will.)