summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Rinaldo <toddr@cpan.org>2020-02-03 11:34:14 -0600
committerTodd Rinaldo <toddr@cpan.org>2020-02-10 21:44:31 -0600
commit869851bb5b209b40df57189210a6c7666a078793 (patch)
treec8b26fe13db971b951370019f95db45941edcdc6
parent2dd6357694048ada6aa39b3e43a831ce783ebc0b (diff)
downloadperl-869851bb5b209b40df57189210a6c7666a078793.tar.gz
Remove %newkeys from Tie::File::_oadjust
Recent efforts to add strict have shown this variable wasn't even being used.
-rw-r--r--dist/Tie-File/lib/Tie/File.pm12
1 files changed, 0 insertions, 12 deletions
diff --git a/dist/Tie-File/lib/Tie/File.pm b/dist/Tie-File/lib/Tie/File.pm
index c72092e305..197a590ede 100644
--- a/dist/Tie-File/lib/Tie/File.pm
+++ b/dist/Tie-File/lib/Tie/File.pm
@@ -747,7 +747,6 @@ sub _oadjust {
my $delta = 0;
my $delta_recs = 0;
my $prev_end = -1;
- my %newkeys;
for (@_) {
my ($pos, $nrecs, @data) = @$_;
@@ -757,7 +756,6 @@ sub _oadjust {
# to the first new one of this batch
for my $i ($prev_end+2 .. $pos - 1) {
$self->{offsets}[$i] += $delta;
- $newkey{$i} = $i + $delta_recs;
}
$prev_end = $pos + @data - 1; # last record moved on this pass
@@ -777,16 +775,6 @@ sub _oadjust {
$delta -= $oldlen;
}
-# # also this data has changed, so update it in the cache
-# for (0 .. $#data) {
-# $self->{cache}->update($pos + $_, $data[$_]);
-# }
-# if ($delta_recs) {
-# my @oldkeys = grep $_ >= $pos + @data, $self->{cache}->ckeys;
-# my @newkeys = map $_ + $delta_recs, @oldkeys;
-# $self->{cache}->rekey(\@oldkeys, \@newkeys);
-# }
-
# replace old offsets with new
splice @{$self->{offsets}}, $pos, $nrecs+1, @newoff;
# What if we just spliced out the end of the offsets table?