use Aleph;
use GoogleBooks;
use vuFind;
+use DPLA;
use Encode;
'ZAG01' => 'Aleph',
'GOOGLEBOOKS' => 'GoogleBooks',
'HATHITRUST' => 'vuFind',
+ 'DPLA' => 'DPLA',
};
my $max_records = 3; # XXX configure this
my $from = $rs->{from} || die "no from?";
# fetch records up to offset
while( $#{ $rs->{results} } < $offset ) {
- push @{ $rs->{results} }, $from->next_marc;
+ my $marc = $from->next_marc;
+ last if ! $marc; # abort results
+ push @{ $rs->{results} }, $marc;
warn "# rs result ", $#{ $rs->{results} },"\n";
}