projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4b3a266
)
try to fill the cache better
author
minima
<minima>
Sun, 29 Sep 2002 00:44:08 +0000
(
00:44
+0000)
committer
minima
<minima>
Sun, 29 Sep 2002 00:44:08 +0000
(
00:44
+0000)
perl/Prefix.pm
patch
|
blob
|
history
diff --git
a/perl/Prefix.pm
b/perl/Prefix.pm
index 484f462ac24feee8bc338acedd703c79207de3df..3fdcdceaf8aa1823b43dedd01d3cbfb297fc28d0 100644
(file)
--- a/
perl/Prefix.pm
+++ b/
perl/Prefix.pm
@@
-148,6
+148,7
@@
sub matchprefix
my $pref = shift;
my @partials;
+ $pref =~ s/-\d+$//;
for (my $i = length $pref; $i; $i--) {
$matchtotal++;
my $s = substr($pref, 0, $i);
@@
-169,7
+170,7
@@
sub matchprefix
dbg("Partial prefix: $pref $s $part" );
}
if (@out && $out[0] eq $s) {
- $cache{$_} =
[ @out ]
for @partials;
+ $cache{$_} =
\@out
for @partials;
return @out;
}
}