X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F310_inline_structor.t;h=27024cea5c67d919ca35a988677bd955f8d9db72;hb=d004c8d565f9b314da7652e9368aeb4587ffaa3d;hp=8e1b05531c23b3a129e5e19219a8fadc2b6a8677;hpb=86a4d8730cfe673db674c692f7703632b700c7c9;p=gitmo%2FClass-MOP.git diff --git a/t/310_inline_structor.t b/t/310_inline_structor.t index 8e1b055..27024ce 100644 --- a/t/310_inline_structor.t +++ b/t/310_inline_structor.t @@ -3,10 +3,9 @@ use warnings; 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; @@ -201,8 +200,7 @@ 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; }