# VVVVV CODE TAKEN FROM TEST::EXCEPTION VVVVV
'Test::Exception' => do {
- my $Tester = Test::Builder->new;
+ my $Tester;
my $is_exception = sub {
my $exception = shift;
unless defined $description;
my $exception = $try_as_caller->($coderef);
+ $Tester ||= Test::Builder->new;
+
my $regex = $Tester->maybe_regex( $expecting );
my $ok = $regex
? ( $exception =~ m/$regex/ )
'lives_ok' => sub (&;$) {
my ( $coderef, $description ) = @_;
my $exception = $try_as_caller->( $coderef );
+
+ $Tester ||= Test::Builder->new;
+
my $ok = $Tester->ok( ! $is_exception->( $exception ), $description );
$Tester->diag( $exception_as_string->( "died:", $exception ) ) unless $ok;
$@ = $exception;