From: Tara L Andrews Date: Wed, 21 May 2014 14:17:49 +0000 (+0000) Subject: use Set::Scalar comparison operator to compare sets. Addresses #24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9289e25757cdc6efa66c3e8406c5de3a0c2da72d;p=scpubgit%2Fstemmatology.git use Set::Scalar comparison operator to compare sets. Addresses #24 --- diff --git a/analysis/lib/Text/Tradition/Analysis.pm b/analysis/lib/Text/Tradition/Analysis.pm index 225cd2b..290b5cc 100644 --- a/analysis/lib/Text/Tradition/Analysis.pm +++ b/analysis/lib/Text/Tradition/Analysis.pm @@ -514,8 +514,8 @@ sub _check_transposed_consistency { if( @doubled == scalar keys %seen_wits ) { foreach my $rdg ( keys %$groupings ) { if( !$thisrank{$rdg} ) { - my $groupstr = wit_stringify( $groupings->{$rdg} ); - my ( $matched ) = grep { $groupstr eq wit_stringify( $groupings->{$_} ) } + # Groupings are Set::Scalar objects so we can compare them outright. + my ( $matched ) = grep { $groupings->{$rdg} == $groupings->{$_} } keys %thisrank; delete $groupings->{$rdg}; # If we found a group match, assume there is a symmetry happening.