3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
|
|
use blib; |
|
|
|
|
6 |
use WebPAC::Common; |
use WebPAC::Common; |
7 |
use base qw/WebPAC::Common/; |
use base qw/WebPAC::Common/; |
8 |
use Text::Iconv; |
use Text::Iconv; |
9 |
|
use Data::Dumper; |
10 |
|
|
11 |
=head1 NAME |
=head1 NAME |
12 |
|
|
100 |
my $n = $self->{module} . '::' . $subclass; |
my $n = $self->{module} . '::' . $subclass; |
101 |
if (! defined &{ $n }) { |
if (! defined &{ $n }) { |
102 |
my $missing = "missing $subclass in $self->{module}"; |
my $missing = "missing $subclass in $self->{module}"; |
103 |
$log->logwarn($missing); |
$self->{$subclass} = sub { $log->logwarn($missing) }; |
|
$self->{$subclass} = sub { warn "$missing\n" }; |
|
104 |
} else { |
} else { |
105 |
$self->{$subclass} = \&{ $n }; |
$self->{$subclass} = \&{ $n }; |
106 |
} |
} |
208 |
} |
} |
209 |
|
|
210 |
if ($self->{limit}) { |
if ($self->{limit}) { |
211 |
$log->info("limiting to ",$self->{limit}," records"); |
$log->debug("limiting to ",$self->{limit}," records"); |
212 |
$limit = $offset + $self->{limit} - 1; |
$limit = $offset + $self->{limit} - 1; |
213 |
$limit = $size if ($limit > $size); |
$limit = $size if ($limit > $size); |
214 |
} |
} |
225 |
|
|
226 |
my $rec = $self->{fetch_rec}->($self, $db, $pos ); |
my $rec = $self->{fetch_rec}->($self, $db, $pos ); |
227 |
|
|
228 |
|
$log->debug(sub { Dumper($rec) }); |
229 |
|
|
230 |
if (! $rec) { |
if (! $rec) { |
231 |
$log->warn("record $pos empty? skipping..."); |
$log->warn("record $pos empty? skipping..."); |
232 |
next; |
next; |