projects
/
scpubgit/stemmatology.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
some syntactic sugar for relationship filters
[scpubgit/stemmatology.git]
/
lib
/
Text
/
Tradition
/
Collation
/
RelationshipStore.pm
diff --git
a/lib/Text/Tradition/Collation/RelationshipStore.pm
b/lib/Text/Tradition/Collation/RelationshipStore.pm
index
aeb8b7f
..
0ee51ab
100644
(file)
--- a/
lib/Text/Tradition/Collation/RelationshipStore.pm
+++ b/
lib/Text/Tradition/Collation/RelationshipStore.pm
@@
-717,6
+717,9
@@
sub related_readings {
# Backwards compat
if( $filter eq 'colocated' ) {
$filter = sub { $_[0]->colocated };
+ } elsif( !ref( $filter ) ) {
+ my $type = $filter;
+ $filter = sub { $_[0]->type eq $type };
}
my %found = ( $reading => 1 );
my $check = [ $reading ];