Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / tool / create-moose-compatibility-tests.pl
index 53e6ec1..9508364 100644 (file)
@@ -6,13 +6,12 @@ use File::Path ();
 use File::Spec ();
 use File::Basename ();
 
-print "Creating compatibility tests in xt/compatibility/* ...\n";
+print "Creating compatibility tests in xt/compat/* ...\n";
 
-File::Path::rmtree(File::Spec->catfile('xt', 'compatibility'));
+File::Path::rmtree(File::Spec->catfile('xt', 'compat'));
 
 # some test does not pass... currently skip it.
 my %SKIP_TEST = (
-    '016-trigger.t'    => "trigger's argument is incompatble :(",
     '810-isa-or.t'     => "Mouse has a bug",
 
     '052-undefined-type-in-union.t' => "Mouse accepts undefined type as a member of union types",
@@ -25,7 +24,8 @@ my %SKIP_TEST = (
     '602-mouse-tiny.t'    => "Moose doesn't support ::Tiny",
     '603-mouse-pureperl.t'=> "Moose doesn't have ::PurePerl",
 
-    '031_roles_applied_in_create.t' => 't/lib/* classes are not Moose classes/roles',
+    '031_roles_applied_in_create.t' => 't/lib/*.pm are not for Moose',
+    '013_metaclass_traits.t'        => 't/lib/*.pm are not for Moose',
 );
 
 my @compat_tests;
@@ -51,7 +51,7 @@ File::Find::find(
 
             my $dirname = File::Basename::dirname($_);
 
-            my $tmpdir = File::Spec->catfile('xt', 'compatibility', $dirname);
+            my $tmpdir = File::Spec->catfile('xt', 'compat', $dirname);
             File::Path::mkpath($tmpdir);
 
             my $tmpfile = File::Spec->catfile($tmpdir, $basename);
@@ -65,6 +65,7 @@ File::Find::find(
                 };
                 $src =~ s/Mouse::(?:Util::)?is_class_loaded/Class::MOP::is_class_loaded/g;
                 $src =~ s/Mouse::(?:Util::)?load_class/Class::MOP::load_class/g;
+                $src =~ s/Mouse::Util::class_of/Class::MOP::class_of/g;
                 $src =~ s/Mouse/Moose/g;
                 $src;
             };