Lines Matching refs:rec
125 my $rec;
128 $rec = $self->{deferred}{$n} if exists $self->{deferred}{$n};
129 $rec = $self->_fetch($n) unless defined $rec;
132 substr($rec, - $self->{recseplen}) = ""
133 if defined $rec && $self->{autochomp};
134 $rec;
151 my ($self, $rec) = @_;
152 return $rec unless $self->{autochomp};
153 return unless defined $rec;
154 substr($rec, - $self->{recseplen}) = "";
155 $rec;
175 my $rec = $self->_read_record;
181 # if ($n == 0 && defined($rec) && tell($self->{fh}) != length($rec)) {
189 $self->{cache}->insert($n, $rec) if defined $rec && not $self->{flushing};
190 $rec;
194 my ($self, $n, $rec) = @_;
197 $self->_fixrecs($rec);
203 return $self->_store_deferred($n, $rec) if $self->_is_deferring;
217 # return if $oldrec eq $rec; # don't bother
218 my $len_diff = length($rec) - length($oldrec);
221 $self->_mtwrite($rec, $self->{offsets}[$n], length($oldrec));
222 $self->_oadjust([$n, 1, $rec]);
223 $self->{cache}->update($n, $rec);
227 my ($self, $n, $rec) = @_;
234 $self->{deferred}{$n} = $rec;
236 my $len_diff = length($rec);
251 my $rec = delete $self->{deferred}{$n};
252 return unless defined $rec;
259 $self->{deferred_s} -= length $rec;
260 $self->{cache}->adj_limit(length $rec);
376 my $rec = $self->FETCH($n);
391 $rec;
472 my $rec = $self->_fetch($_);
473 last unless defined $rec;
474 push @result, $rec;
476 # Why don't we just use length($rec) here?
479 # and in this case length($rec) is the length of the record to be
865 my $rec;
869 $rec = $self->_read_record;
870 if (defined $rec) {
902 # assumes that $rec is already suitably terminated
904 my ($self, $rec) = @_;
907 print $fh $rec
909 # $self->{_written} += length($rec);
914 my $rec;
917 $rec = <$fh>;
919 return unless defined $rec;
920 if (substr($rec, -$self->{recseplen}) ne $self->{recsep}) {
922 # my $ac = substr($rec, -$self->{recseplen});
930 $rec .= $self->{recsep};
932 # $self->{_read} += length($rec) if defined $rec;
933 $rec;
1315 _ci_warn("rec 0: offset <$self->{offsets}[0]> s/b 0!");
1332 _ci_warn("rec $n: offset <$offset> actual <$ao>");
1337 _ci_warn("rec $n: cached <$cached> actual <$_>");
1341 _ci_warn("rec $n in the cache is missing the record separator");
1388 _ci_warn("rec $n in the deferbuffer is missing the record separator");
2222 $rec = $o->FETCH($n);
2223 $o->STORE($n, $rec);