From 164d1f9b8ebb2d1e112507a45a3ad71558bafaed Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 8 May 2015 10:08:02 +0200 Subject: [PATCH] Bug 13758: Correct KOHA::VERSION in OverDrive.pm Correct $KOHA::VERSION to $Koha::VERSION. Also, passing this string to LWP::UserAgent is wrong. It expects key/value pairs. Since this string is apparently intended as an agent, this patch passes it as such. Note: The OverDrive has unfortunately no unit tests. Signed-off-by: Marcel de Rooy Tested this change in the perl debugger with just these lines: use C4::External::OverDrive; C4::External::OverDrive::_request(); Printed $ua->agent while stepping into sub _request. Without the agent change, the adjusted Koha string would just be ignored and I would still have "libwww-perl/6.04" as agent. Signed-off-by: Tomas Cohen Arazi --- C4/External/OverDrive.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/External/OverDrive.pm b/C4/External/OverDrive.pm index 338dd76355..369377a065 100644 --- a/C4/External/OverDrive.pm +++ b/C4/External/OverDrive.pm @@ -40,7 +40,7 @@ BEGIN { sub _request { my ( $request ) = @_; - my $ua = LWP::UserAgent->new( "Koha " . $KOHA::VERSION ); + my $ua = LWP::UserAgent->new( agent => "Koha " . $Koha::VERSION ); my $response; eval { -- 2.11.4.GIT