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;
BEGIN {
require Exporter;
- our $VERSION = 3.07.00.049;
our @ISA = qw( Exporter ) ;
our @EXPORT = qw(
IsOverDriveEnabled
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 {
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;