--- trunk/lib/WebPAC/Input/MARC.pm 2005/12/19 19:55:21 298 +++ trunk/lib/WebPAC/Input/MARC.pm 2005/12/31 16:41:35 337 @@ -3,8 +3,6 @@ use warnings; use strict; -use blib; - use MARC::Fast; =head1 NAME @@ -13,11 +11,11 @@ =head1 VERSION -Version 0.02 +Version 0.04 =cut -our $VERSION = '0.02'; +our $VERSION = '0.04'; =head1 SYNOPSIS @@ -52,7 +50,7 @@ my $db = new MARC::Fast( marcdb => $arg->{path}); my $db_size = $db->count - 1; # FIXME - $self->{size} = $db_size; + $self->{_marc_size} = $db_size; return ($db, $db_size); } @@ -72,15 +70,25 @@ my ($db, $mfn) = @_; - if ($mfn > $self->{size}) { - $self->_get_logger()->warn("seek beyond database size $self->{size} to $mfn"); + if ($mfn > $self->{_marc_size}) { + $self->_get_logger()->warn("seek beyond database size $self->{_marc_size} to $mfn"); } else { - my $row = $db->fetch($mfn); + my $row = $db->to_hash($mfn); push @{$row->{'000'}}, $mfn; return $row; } } +=head1 PROPERTIES + +=head2 _marc_size + +Store size of MARC database + + print $self->{_marc_size}; + + + =head1 AUTHOR Dobrica Pavlinusic, C<< >>