Una alternativa es usar el módulo Test::Exception si está instalado:
BEGIN {
$test_exception_installed = 1;
eval { require Test::Exception };
$test_exception_installed = 0 if $@;
}
para posteriormente aplicar la prueba:
SKIP: {
skip "Test::Exception not installed", 1 unless $test_exception_installed;
Test::Exception::lives_ok
{ Parse::Eyapp->new_grammar( input=>$translationscheme) }
'No errors in input translation scheme';
}
Casiano Rodríguez León
