From: Tara L Andrews Date: Fri, 17 Feb 2012 14:45:40 +0000 (+0100) Subject: remove redundant a.c. witnesses from list X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c12bb87843b49eee09f588126ac7d375046b29fd;p=scpubgit%2Fstemmatology.git remove redundant a.c. witnesses from list --- diff --git a/lib/Text/Tradition/Collation.pm b/lib/Text/Tradition/Collation.pm index c5c9a91..3a9b056 100644 --- a/lib/Text/Tradition/Collation.pm +++ b/lib/Text/Tradition/Collation.pm @@ -455,6 +455,10 @@ sub reading_witnesses { my $wits = $self->sequence->get_edge_attributes( @$e ); @all_witnesses{ keys %$wits } = 1; } + my $acstr = $self->ac_label; + foreach my $acwit ( grep { $_ =~ s/^(.*)\Q$acstr\E$/$1/ } keys %all_witnesses ) { + delete $all_witnesses{$acwit.$acstr} if exists $all_witnesses{$acwit}; + } return keys %all_witnesses; }