--- /dev/null
+#!/usr/bin/env perl
+use Test::More;
+
+my $id = 0;
+foreach my $mod (qw(Mouse Mouse::Role Mouse::Exporter)){
+ $id++;
+ eval qq{
+ no strict;
+ no warnings;
+
+ package Class$id;
+ use $mod;
+
+ my \$foo = 'foo';
+ chop \$\$foo;
+ };
+ like $@, qr/Can't use string \("foo"\) as a SCALAR ref while "strict refs" in use /, # '
+ "using $mod turns on strictures";
+
+ my @warnings;
+ local $SIG{__WARN__} = sub {
+ push @warnings, @_;
+ };
+
+ $id++;
+ eval qq{
+ no strict;
+ no warnings;
+
+ package Class$id;
+ use $mod;
+
+ my \$one = 1 + undef;
+ };
+ is $@, '';
+
+ like("@warnings", qr/^Use of uninitialized value/, "using $mod turns on warnings");
+}
+
+done_testing;
+++ /dev/null
-#!/usr/bin/env perl
-use Test::More tests => 1;
-use Test::Exception;
-
-throws_ok {
- package Class;
- use Mouse;
-
- my $foo = '$foo';
- chop $$foo;
-} qr/Can't use string \("\$foo"\) as a SCALAR ref while "strict refs" in use /,
- 'using Mouse turns on strictures';
-
+++ /dev/null
-#!/usr/bin/env perl
-use Test::More tests => 1;
-
-# we used to use Test::Warn here but there's no point in adding three deps total
-# for this one easy test
-
-my @warnings;
-local $SIG{__WARN__} = sub {
- push @warnings, "@_";
-};
-
-do {
- package Class;
- use Mouse;
-
- my $one = 1 + undef;
-};
-
-like("@warnings", qr/^Use of uninitialized value/, 'using Mouse turns on warnings');
-
+++ /dev/null
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use Test::More tests => 1;
-
-require Mouse;
-
-can_ok('Mouse::Object' => 'new');