|
Lines 27-33
Koha::BiblioUtils::Iterator - iterates over biblios provided by a DBIx::Class::R
Link Here
|
| 27 |
|
27 |
|
| 28 |
This provides an iterator that gives the MARC::Record of each biblio that's |
28 |
This provides an iterator that gives the MARC::Record of each biblio that's |
| 29 |
returned by a L<DBIx::Class::ResultSet> that provides a C<biblionumber>, and |
29 |
returned by a L<DBIx::Class::ResultSet> that provides a C<biblionumber>, and |
| 30 |
C<marc> or C<marcxml> column from the biblioitems table. |
30 |
C<marcxml> column from the biblioitems table. |
| 31 |
|
31 |
|
| 32 |
=head1 SYNOPSIS |
32 |
=head1 SYNOPSIS |
| 33 |
|
33 |
|
|
Lines 92-105
sub next {
Link Here
|
| 92 |
my $marc; |
92 |
my $marc; |
| 93 |
my $row = $self->{rs}->next(); |
93 |
my $row = $self->{rs}->next(); |
| 94 |
return if !$row; |
94 |
return if !$row; |
| 95 |
if ( $row->marc ) { |
95 |
if ( $row->marcxml ) { |
| 96 |
$marc = MARC::Record->new_from_usmarc( $row->marc ); |
|
|
| 97 |
} |
| 98 |
elsif ( $row->marcxml ) { |
| 99 |
$marc = MARC::Record->new_from_xml( $row->marcxml ); |
96 |
$marc = MARC::Record->new_from_xml( $row->marcxml ); |
| 100 |
} |
97 |
} |
| 101 |
else { |
98 |
else { |
| 102 |
confess "No marc or marcxml column returned in the request."; |
99 |
confess "No marcxml column returned in the request."; |
| 103 |
} |
100 |
} |
| 104 |
|
101 |
|
| 105 |
my $bibnum; |
102 |
my $bibnum; |
| 106 |
- |
|
|