git.shiar.nl
/
perl
/
list-index.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
12c2437
)
clean solution for List::MoreUtils::uniq hack
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 15 Nov 2009 03:39:30 +0000
(
04:39
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 15 Nov 2009 03:39:30 +0000
(
04:39
+0100)
lib/List/Index.pm
patch
|
blob
|
history
diff --git
a/lib/List/Index.pm
b/lib/List/Index.pm
index f703d974ebabfdea316db90cd5764c2a9bea45f2..e56d7713be5f5e113c7152b8a19f49e904d79b61 100644
(file)
--- a/
lib/List/Index.pm
+++ b/
lib/List/Index.pm
@@
-74,11
+74,9
@@
sub ranges {
$lookahead = $context - $penalty;
}
$lookahead = $context - $penalty;
}
- push @links, $link;
+ push @links, $link
unless $links[-1] eq $link
;
}
}
- use List::MoreUtils 'uniq';
- @links = uniq @links;
for my $i (0 .. $#links - 1) {
my ($link, $lastchar) = $links[$i + 1] =~ /(.*)(.)/;
$link .= $lastchar le 'a' ? '.' : chr( ord($lastchar) - 1 );
for my $i (0 .. $#links - 1) {
my ($link, $lastchar) = $links[$i + 1] =~ /(.*)(.)/;
$link .= $lastchar le 'a' ? '.' : chr( ord($lastchar) - 1 );