1HTTP::OAI::ListRecords(U3spemr)Contributed Perl DocumentHaTtTiPo:n:OAI::ListRecords(3pm)
2
3
4
6 HTTP::OAI::ListRecords - Provide access to an OAI ListRecords response
7
9 my $r = $h->ListRecords(
10 metadataPrefix=>'oai_dc',
11 );
12
13 while( my $rec = $r->next ) {
14 print "Identifier => ", $rec->identifier, "\n";
15 }
16
17 die $r->message if $r->is_error;
18
19 # Using callback method
20 sub callback {
21 my $rec = shift;
22 print "Identifier => ", $rec->identifier, "\n";
23 };
24 my $r = $h->ListRecords(
25 metadataPrefix=>'oai_dc',
26 onRecord=>\&callback
27 );
28 die $r->message if $r->is_error;
29
31 $lr = new HTTP::OAI::ListRecords
32 This constructor method returns a new HTTP::OAI::ListRecords
33 object.
34
35 $rec = $lr->next
36 Returns either an HTTP::OAI::Record object, or undef, if no more
37 record are available. Use $rec->is_error to test whether there was
38 an error getting the next record.
39
40 @recl = $lr->record([$rec])
41 Returns the record list and optionally adds a new record or
42 resumptionToken, $rec. Returns an array ref of HTTP::OAI::Records,
43 including an optional resumptionToken string.
44
45 $token = $lr->resumptionToken([$token])
46 Returns and optionally sets the HTTP::OAI::ResumptionToken.
47
48 $dom = $lr->toDOM
49 Returns a XML::DOM object representing the ListRecords response.
50
51
52
53perl v5.32.0 2020-07-28 HTTP::OAI::ListRecords(3pm)