4 if( $ENV{PERL_CORE} ) {
6 @INC = ('../lib', 'lib');
15 use Test::More 'no_plan';
17 require Test::Builder;
18 my $tb = Test::Builder->new;
20 local $SIG{__DIE__} = sub { fail("DIE handler called: @_") };
22 # These should not change;
26 is $tb->_try(sub { 2 }), 2;
27 is $tb->_try(sub { return '' }), '';
29 is $tb->_try(sub { die; }), undef;
31 is_deeply [$tb->_try(sub { die "Foo\n" }, undef)],