use Class::MOP;
use Class::MOP::Class;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
my %results;
%results = ();
my $o = $meta->get_meta_instance->create_instance;
isa_ok( $o, 'Base' );
- ok ! exception {
+ lives_ok {
$o->hey;
$o->hey
; # this would die with 'Can't use string ("barf") as a subroutine ref while "strict refs" in use'
- },
+ }
'wrapped doesn\'t die when $_ gets changed';
is_deeply(
\%results, { base => 2, wrapped => 2 },
%results = ();
my $o = $meta->get_meta_instance->create_instance;
isa_ok( $o, 'Base' );
- ok ! exception {
+ lives_ok {
$o->hey;
$o->hey
; # this would die with 'Can't use string ("barf") as a subroutine ref while "strict refs" in use'
- },
+ }
'double-wrapped doesn\'t die when $_ gets changed';
is_deeply(
\%results, { base => 2, wrapped => 4 },