if ( $INC{"Moose/Role.pm"} ) {
return {
import => \&Moose::Role::import,
- unimport => \&Moose::Role::unimport,
+ unimport => defined &Moose::Role::unimport ? \&Moose::Role::unimport : sub {},
}
} else {
require Mouse::Role;
};
ok(!Foo::Role->can('has'), "Mouse::Role::has was unimported");
-ok(!Bar::Role->can('has'), "Moose::Role::has was unimported");
+SKIP: {
+ skip "ancient moose", 1 if $Moose::VERSION <= 0.50;
+ ok(!Bar::Role->can('has'), "Moose::Role::has was unimported");
+}
eval "
package Foo::Role;