use Devel::EvalError; my $ee = EvalExpectOne { ...; 1 }; ... $ee->Reuse(); $ee = EvalExpectOneStr "..."; # EvalExpectOneStr could append the "; 1" to the end automatically #### return BOOL { $obj->Succeeded() } STR { $obj->Reason() } LIST { $obj->AllReasons() };