use strict;
use warnings;
-use Test::More tests => 12;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
{
has 'buz' => ( is => 'rw', default => q{"'\\} );
has 'faz' => ( is => 'rw', default => qq{\0} );
- ::lives_ok { __PACKAGE__->meta->make_immutable }
- 'no errors making a package immutable when it has default values that could break quoting';
+ ::is( ::exception { __PACKAGE__->meta->make_immutable }, undef, 'no errors making a package immutable when it has default values that could break quoting' );
}
my $foo = Foo->new;
has 'buz' => ( is => 'rw', default => q{"'\\}, lazy => 1 );
has 'faz' => ( is => 'rw', default => qq{\0}, lazy => 1 );
- ::lives_ok { __PACKAGE__->meta->make_immutable }
- 'no errors making a package immutable when it has lazy default values that could break quoting';
+ ::is( ::exception { __PACKAGE__->meta->make_immutable }, undef, 'no errors making a package immutable when it has lazy default values that could break quoting' );
}
my $bar = Bar->new;
'default value for buz attr' );
is( $bar->faz, qq{\0},
'default value for faz attr' );
+
+done_testing;