Include method name in immutable methods (fixes #49680)
[gitmo/Class-MOP.git] / t / 310_inline_structor.t
index bbdcce8..88aa7ad 100644 (file)
@@ -6,7 +6,7 @@ use Test::More;
 BEGIN {
     eval "use Test::Output;";
     plan skip_all => "Test::Output is required for this test" if $@;
-    plan 'no_plan';
+    plan tests => 15;
 }
 
 use Class::MOP;
@@ -202,13 +202,15 @@ use Class::MOP;
     sub _inline_destructor {
         my $self = shift;
 
-        my $code = $self->_eval_closure( {}, 'sub { }' );
+        my ( $code, $e ) = $self->_eval_closure( {}, 'sub { }' );
+        die $e if $e;
 
         $self->{body} = $code;
     }
 
     sub is_needed { 1 }
     sub associated_metaclass { $_[0]->{metaclass} }
+    sub body { $_[0]->{body} }
     sub _expected_method_class { 'Base::Class' }
 }