From: Tara L Andrews Date: Fri, 28 Sep 2012 10:48:00 +0000 (+0200) Subject: bugfix for applying base regularization X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48cb9a903682cd245786112cc5cecedc3b2cf446;p=scpubgit%2Fstemmatology.git bugfix for applying base regularization --- diff --git a/morphology/lib/Text/Tradition/Morphology.pm b/morphology/lib/Text/Tradition/Morphology.pm index e3cdc5c..fc59bd9 100644 --- a/morphology/lib/Text/Tradition/Morphology.pm +++ b/morphology/lib/Text/Tradition/Morphology.pm @@ -189,7 +189,10 @@ sub regularize { my $mod = 'Text::Tradition::Language::' . $self->language; eval { load( $mod ); }; # If a module doesn't exist for our language, use the base routine - $mod = 'Text::Tradition::Language::Base' if $@; + if( $@ ) { + $mod = 'Text::Tradition::Language::Base'; + load( $mod ); + } return $mod->can( 'regularize' )->( $self->text ); } else { return $self->text;