Commit c4816848 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Document transcript().

parent ef3f3c24
...@@ -139,6 +139,16 @@ sub new_fast { ...@@ -139,6 +139,16 @@ sub new_fast {
return bless $hashref, $class; return bless $hashref, $class;
} }
=head2 transcript
Arg [1] : Transcript object (optional)
Description : Sets or retrieves the transcript object associated
with this translation object.
Exceptions : Throws if there is no adaptor or no dbID defined for
the translation object.
=cut
sub transcript { sub transcript {
my ( $self, $transcript ) = @_; my ( $self, $transcript ) = @_;
...@@ -151,7 +161,7 @@ sub transcript { ...@@ -151,7 +161,7 @@ sub transcript {
$self->{'transcript'} = $transcript; $self->{'transcript'} = $transcript;
weaken( $self->{'transcript'} ); weaken( $self->{'transcript'} ); # Avoid circular references.
} elsif ( !defined( $self->{'transcript'} ) ) { } elsif ( !defined( $self->{'transcript'} ) ) {
my $adaptor = $self->{'adaptor'}; my $adaptor = $self->{'adaptor'};
...@@ -170,7 +180,7 @@ sub transcript { ...@@ -170,7 +180,7 @@ sub transcript {
$adaptor->db()->get_TranscriptAdaptor() $adaptor->db()->get_TranscriptAdaptor()
->fetch_by_translation_id($dbID); ->fetch_by_translation_id($dbID);
weaken( $self->{'transcript'} ); weaken( $self->{'transcript'} ); # Avoid circular references.
} }
return $self->{'transcript'}; return $self->{'transcript'};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment