X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FCollation%2FReading%2FLexeme.pm;h=fa564ee5dcad2903535a6c867f6c7f83d2d66d24;hb=6be2fbcb9418e57bb96469526834721118fb8da0;hp=b6c76937ea0d6430f1feb3d1cd2389f66c72b83d;hpb=5ac9acd842b39856560430f8268b00364983a017;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition/Collation/Reading/Lexeme.pm b/lib/Text/Tradition/Collation/Reading/Lexeme.pm index b6c7693..fa564ee 100644 --- a/lib/Text/Tradition/Collation/Reading/Lexeme.pm +++ b/lib/Text/Tradition/Collation/Reading/Lexeme.pm @@ -4,6 +4,7 @@ use Moose; use JSON (); use Module::Load; use Text::Tradition::Collation::Reading::WordForm; +use Text::Tradition::Error; =head1 NAME @@ -78,6 +79,7 @@ has 'wordform_matchlist' => ( 'matching_forms' => 'elements', 'matching_form' => 'get', 'add_matching_form' => 'push', + 'clear_matching_forms' => 'clear', }, default => sub { [] }, ); @@ -188,6 +190,14 @@ sub TO_JSON { $hash->{'wordform_matchlist'} = [ $self->matching_forms ] if $self->matches; return $hash; } + +sub throw { + Text::Tradition::Error->throw( + 'ident' => 'Lexeme error', + 'message' => $_[0], + ); +} + no Moose; __PACKAGE__->meta->make_immutable;