Workaround Test::Builder2's problem that it loads the XS stuff of 'Mouse',
[gitmo/Mouse.git] / t / 100_bugs / 013_lazybuild_required_undef.t
index 2c07718..a5377cb 100644 (file)
@@ -1,3 +1,6 @@
+use strict;
+use Test::More tests => 4;
+
 package Foo;
 use Mouse;
 
@@ -17,7 +20,6 @@ has 'bar' => ( isa => 'Int | Undef', is => 'rw', coerce => 1 );
 sub _build_foo { undef }
 
 package main;
-use Test::More tests => 4;
 
 ok ( !defined(Foo->new->bar), 'NonLazyBuild: Undef default' );
 ok ( !defined(Foo->new->bar(undef)), 'NonLazyBuild: Undef explicit' );
@@ -26,6 +28,3 @@ ok ( !defined(Foo->new->foo), 'LazyBuild: Undef default/lazy_build' );
 
 ## This test fails at the time of creation.
 ok ( !defined(Foo->new->foo(undef)), 'LazyBuild: Undef explicit' );
-
-
-1;