Skip Menu |

This queue is for tickets about the HTTP-OAI CPAN distribution.

Report information
The Basics
Id: 69337
Status: new
Priority: 0/
Queue: HTTP-OAI

People
Owner: Nobody in particular
Requestors: mauricemengel [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Resume HTTP::OAI::Harvester
Date: Thu, 7 Jul 2011 16:29:27 +0200
To: bug-HTTP-OAI [...] rt.cpan.org
From: Maurice Mengel <mauricemengel [...] gmail.com>
Hi Tim, I have a problem which i have not yet quite figured out. Resume works with oai_browser.pl but not when I use the code from the synopsis. The difference seems to be "onRecord". When I leave that out, resume does not work. Any help appreciated as always! Thanks maurice PS: 3.25
Subject: Re: [rt.cpan.org #69337] AutoReply: Resume HTTP::OAI::Harvester
Date: Sat, 9 Jul 2011 12:06:35 +0200
To: bug-HTTP-OAI [...] rt.cpan.org
From: Maurice Mengel <mauricemengel [...] gmail.com>
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" ); } } }