209 |
if (my $s = $self->{'start_mfn'}) { |
if (my $s = $self->{'start_mfn'}) { |
210 |
$log->info("skipping to MFN $s"); |
$log->info("skipping to MFN $s"); |
211 |
$startmfn = $s; |
$startmfn = $s; |
212 |
|
} else { |
213 |
|
$self->{'start_mfn'} = $startmfn; |
214 |
} |
} |
215 |
|
|
216 |
$maxmfn = $startmfn + $self->{limit_mfn} if ($self->{limit_mfn}); |
$maxmfn = $startmfn + $self->{limit_mfn} if ($self->{limit_mfn}); |
266 |
|
|
267 |
} |
} |
268 |
|
|
269 |
$self->{'current_mfn'} = $startmfn; |
$self->{'current_mfn'} = -1; |
270 |
$self->{'last_pcnt'} = 0; |
$self->{'last_pcnt'} = 0; |
271 |
|
|
272 |
$log->debug("max mfn: $maxmfn"); |
$log->debug("max mfn: $maxmfn"); |
289 |
|
|
290 |
my $log = $self->_get_logger(); |
my $log = $self->_get_logger(); |
291 |
|
|
292 |
my $mfn = $self->{'current_mfn'}++ || $log->logconfess("it seems that you didn't load database!"); |
$log->logconfess("it seems that you didn't load database!") unless ($self->{'current_mfn'}); |
293 |
|
|
294 |
|
if ($self->{'current_mfn'} == -1) { |
295 |
|
$self->{'current_mfn'} = $self->{'start_mfn'}; |
296 |
|
} else { |
297 |
|
$self->{'current_mfn'}++; |
298 |
|
} |
299 |
|
|
300 |
|
my $mfn = $self->{'current_mfn'}; |
301 |
|
|
302 |
if ($mfn > $self->{'max_mfn'}) { |
if ($mfn > $self->{'max_mfn'}) { |
303 |
$self->{'current_mfn'} = $self->{'max_mfn'}; |
$self->{'current_mfn'} = $self->{'max_mfn'}; |
314 |
} |
} |
315 |
} |
} |
316 |
|
|
317 |
|
=head2 mfn |
318 |
|
|
319 |
|
Returns current record number (MFN). |
320 |
|
|
321 |
|
print $webpac->mfn; |
322 |
|
|
323 |
|
=cut |
324 |
|
|
325 |
|
sub mfn { |
326 |
|
my $self = shift; |
327 |
|
return $self->{'current_mfn'}; |
328 |
|
} |
329 |
|
|
330 |
=head2 progress_bar |
=head2 progress_bar |
331 |
|
|
332 |
Draw progress bar on STDERR. |
Draw progress bar on STDERR. |