From: Tara L Andrews Date: Sat, 18 Jan 2014 16:18:02 +0000 (+0100) Subject: Add function to expose relationship types from Collation object X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39d1ddc7ab35e07a946ac942863c57b336c571e7;p=scpubgit%2Fstemmatology.git Add function to expose relationship types from Collation object --- diff --git a/base/lib/Text/Tradition/Collation.pm b/base/lib/Text/Tradition/Collation.pm index f1903ce..095f331 100644 --- a/base/lib/Text/Tradition/Collation.pm +++ b/base/lib/Text/Tradition/Collation.pm @@ -233,6 +233,12 @@ sub register_relationship_type { $self->relations->add_type( %args ); } +sub get_relationship_type { + my( $self, $name ) = @_; + return $self->relations->has_type( $name ) + ? $self->relations->type( $name ) : undef; +} + ### Reading construct/destruct functions sub add_reading {