--- /dev/null
+BEGIN {
+ use strict;
+ use warnings;
+ use Test::More;
+ use Test::Exception;
+ use FindBin;
+ use lib "$FindBin::Bin/lib";
+
+ eval "use Sub::Exporter";
+ plan $@
+ ? ( skip_all => "Tests require Sub::Exporter" )
+ : ( tests => 3 );
+}
+
+use SubExporterCompatibility qw(MyStr);
+
+ok MyStr->check('aaa'), "Correctly passed";
+ok !MyStr->check([1]), "Correctly fails";
+ok something(), "Found the something method";
+
--- /dev/null
+package SubExporterCompatibility; {
+
+ use MooseX::Types::Moose qw(Str);
+ use MooseX::Types -declare => [qw(MyStr)];
+ use Sub::Exporter -setup => { exports => [ qw(something) ] };
+
+ subtype MyStr,
+ as Str;
+
+ sub something {
+ return 1;
+ }
+
+} 1;