has plus_three => (
is => 'rw',
- isa => quote_sub(
+ coerce => quote_sub(
q{
my ($value) = @_;
$value + $plus
use Sub::Quote;
use Moo;
- has dies => (
+ has plus_three => (
is => 'rw',
- isa => quote_sub(
+ coerce => quote_sub(
q{
die 'could not add three!'
},
);
}
-like exception { Biff->new(plus_three => 1) }, 'could not add three!', 'Exception properly thrown';
+like exception { Biff->new(plus_three => 1) }, qr/could not add three!/, 'Exception properly thrown';
done_testing;