Sorry that I was not more precise in earlier message!
HTTP::OAI::Harvester
v3.25
I believe there is a problem with the auto resume functionality
use strict;
use warnings;
use HTTP::OAI;
my $harvester = HTTP::OAI::Harvester->new(
'baseURL' => '
http://localhost:3000/oai',
#resume is default, but just for illustration
resume => 1,
);
my $response = $harvester->ListRecords(
metadataPrefix => 'oai_dc',
set => '78',
#onRecord => sub {1;},
);
This does not auto resume, it reads only the first page (for
listRecords, listidentifiers, with or without sets). When i use
onRecord as indicated it does auto resume, but then I don't get the
response request that I expect. I don't believe this is a feature. I
cannot fix it.
As a workaround I am using, in case anyone is interested
if ( $response->resumptionToken && $harvester->resume) {
while ( my $rt = $response->resumptionToken ) {
verbose 'auto resume ' . $rt->resumptionToken;
$response->resume( resumptionToken => $rt );
if ( $response->is_error ) {
die( "Error resuming: " . $response->message . "\n" );
}
}
}