Bug 18072: (QA follow-up) Remove warning from tests
[koha.git] / C4 / External / OverDrive.pm
index bed0d55..9044169 100644 (file)
@@ -20,8 +20,9 @@ package C4::External::OverDrive;
 use strict;
 use warnings;
 
+use Koha;
 use JSON;
-use Koha::Cache;
+use Koha::Caches;
 use HTTP::Request;
 use HTTP::Request::Common;
 use LWP::Authen::Basic;
@@ -29,7 +30,6 @@ use LWP::UserAgent;
 
 BEGIN {
     require Exporter;
-    our $VERSION = 3.07.00.049;
     our @ISA = qw( Exporter ) ;
     our @EXPORT = qw(
         IsOverDriveEnabled
@@ -39,7 +39,7 @@ BEGIN {
 
 sub _request {
     my ( $request ) = @_;
-    my $ua = LWP::UserAgent->new( "Koha " . C4::Context->KOHAVERSION );
+    my $ua = LWP::UserAgent->new( agent => "Koha " . $Koha::VERSION );
 
     my $response;
     eval {
@@ -99,7 +99,7 @@ sub GetOverDriveToken {
 
     my $cache;
 
-    eval { $cache = Koha::Cache->get_instance() };
+    eval { $cache = Koha::Caches->get_instance() };
 
     my $token;
     $cache and $token = $cache->get_from_cache( "overdrive_token" ) and return $token;