HTTP::OAI::ListRecords(3pm)

HTTP::OAI::ListRecords3pm

Provide access to an oai listrecords response

Usage

        my $r = $h->ListRecords(
                metadataPrefix=>'oai_dc',
        );
        while( my $rec = $r->next ) {
                print "Identifier => ", $rec->identifier, "\n";
        }
        die $r->message if $r->is_error;
        # Using callback method
        sub callback {
                my $rec = shift;
                print "Identifier => ", $rec->identifier, "\n";
        };
        my $r = $h->ListRecords(
                metadataPrefix=>'oai_dc',
                onRecord=>\&callback
        );
        die $r->message if $r->is_error;

Methods

$lr = new HTTP::OAI::ListRecords

This constructor method returns a new HTTP::OAI::ListRecords object.

$rec = $lr->next

Returns either an HTTP::OAI::Record object, or undef, if no more record are available. Use $rec->is_error to test whether there was an error getting the next record.

@recl = $lr->record([$rec])

Returns the record list and optionally adds a new record or resumptionToken, $rec. Returns an array ref of HTTP::OAI::Records, including an optional resumptionToken string.

$token = $lr->resumptionToken([$token])

Returns and optionally sets the HTTP::OAI::ResumptionToken.

$dom = $lr->toDOM

Returns a XML::DOM object representing the ListRecords response.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7–8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

From libhttp-oai-perl 4.13-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.