# Test setting and recovering language
my $t = Text::Tradition->new( input => 'Self', file => 't/data/legendfrag.xml' );
-warning_like { $t->language( 'Klingon' ); } qr/^Cannot load language/,
+warning_like { $t->language( 'Klingon' ); } qr/^Cannot load any language/,
"Got expected warning for setting of unsupported language";
$t->language( 'English' );
is( $t->language, 'English', "Successfully set supported language" );
try {
load( "Text::Tradition::Language::".$_[0] );
} catch ( $e ) {
- warn( "Cannot load language module for @_: $e" );
+ warn "Cannot load any language module for @_";
}
}
};
if( $self->has_language ) {
# If we do have a language, regularize the tokens in $answer.
my $mod = 'Text::Tradition::Language::' . $self->language;
- my $rsub;
eval { load( $mod ); };
# If a module doesn't exist for our language, use the base routine
$mod = 'Text::Tradition::Language::Base' if $@;
<data key="de8">orthographic</data>
<data key="de7">local</data>
</edge>
- <edge source="n14" target="n22" id="e3">
- <data key="de5">oriundus</data>
- <data key="de6">#LACUNA#</data>
- <data key="de8">collated</data>
- <data key="de7">local</data>
- </edge>
<edge source="n16" target="n17" id="e4">
<data key="de5">svecia</data>
<data key="de6">suetia</data>
# Test setting and recovering language
my $t = Text::Tradition->new( input => 'Self', file => 't/data/legendfrag.xml' );
-warning_like { $t->language( 'Klingon' ); } qr/^Cannot load language/,
+warning_like { $t->language( 'Klingon' ); } qr/^Cannot load any language/,
"Got expected warning for setting of unsupported language";
$t->language( 'English' );
is( $t->language, 'English', "Successfully set supported language" );