aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/02-mx-m-s.t11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/02-mx-m-s.t b/t/02-mx-m-s.t
index 3501d34..856e9ba 100644
--- a/t/02-mx-m-s.t
+++ b/t/02-mx-m-s.t
@@ -5,10 +5,13 @@ use warnings;
use Test::More;
use Test::Exception;
-eval { require MooseX::Method::Signatures };
-plan skip_all => "No MooseX::Method::Signatures" if $@;
-
-plan tests => 2;
+BEGIN {
+ if (eval { require MooseX::Method::Signatures }) {
+ plan tests => 2;
+ } else {
+ plan skip_all => 'This test needs MooseX::Method::Signatures';
+ }
+}
{
package MyClass;