X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FExternal%2FOverDrive.pm;h=9044169b59a8a4b1361346b8caf5a71df9d7c014;hb=6db48e9d21be112880c5ae74640800e30ad42947;hp=bed0d55f4d69212bcc84e730a9572e951728b1b4;hpb=e9715c792103a3d043e08b00f1e938a6f5e8ac67;p=koha.git diff --git a/C4/External/OverDrive.pm b/C4/External/OverDrive.pm index bed0d55f4d..9044169b59 100644 --- a/C4/External/OverDrive.pm +++ b/C4/External/OverDrive.pm @@ -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;