Bug 13758: Correct KOHA::VERSION in OverDrive.pm
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 8 May 2015 08:08:02 +0000 (10:08 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 11 May 2015 12:36:07 +0000 (09:36 -0300)
commit164d1f9b8ebb2d1e112507a45a3ad71558bafaed
tree4bc9c302c13e4906c52c5681d3ac0eb6c49be9c9
parent20b842e7b0ae1d0378c37ad854532cd1294c574f
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 <m.de.rooy@rijksmuseum.nl>
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 <tomascohen@gmail.com>
C4/External/OverDrive.pm