use strict;
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
-BEGIN {
- eval { require JSON::Any } or do {
- plan skip_all => "JSON::Any is required for this test";
- exit 0;
- }
-}
+use Test::Requires {
+ 'JSON::Any' => 0.01, # skip all if not installed
+};
{
package Thing;
my $i = Thing->new(foo => "bar");
-lives_ok {
+is( exception {
$i . "";
-} 'Can stringify without deep recursion';
+}, undef, 'Can stringify without deep recursion');
done_testing;