=cut
-use C4::Biblio; # EmbedItemsInMarcBiblio
+use C4::Biblio;
use Koha::MetadataIterator;
use Koha::Database;
use Modern::Perl;
-use Data::Dumper; # TODO remove
use base qw(Koha::MetadataRecord);
$search_terms = \[ 'mod(biblionumber, ?) = ?', $slice_count, $slice_modulo ];
}
+ my $search_options = { columns => [qw/ biblionumber /] };
+ if ( $options{desc} ){
+ $search_options->{order_by} = { -desc => 'biblionumber' };
+ }
+
my $database = Koha::Database->new();
my $schema = $database->schema();
my $rs =
$schema->resultset('Biblio')->search(
$search_terms,
- { columns => [qw/ biblionumber /] } );
+ $search_options );
my $next_func = sub {
# Warn and skip bad records, otherwise we break the loop
while (1) {