use Test::More;
-BEGIN {
- eval "use Test::Output;";
- plan skip_all => "Test::Output is required for this test" if $@;
-}
+use Test::Requires {
+ 'Test::Output' => '0.01', # skip all if not installed
+};
use Class::MOP;
sub _inline_destructor {
my $self = shift;
- my ( $code, $e ) = $self->_eval_closure( {}, 'sub { }' );
- die $e if $e;
+ my $code = $self->_compile_code('sub { }');
$self->{body} = $code;
}