Source

p5-sub-nonrole / t / 01basic.t

Diff from to

File t/01basic.t

 
 use Test::More tests => 1;
 
-package Foo;
-use Moo::Role;
-use Sub::NonRole;
-::pass();
+{
+	package Local::Role;
+	use Moo::Role;
+	use Sub::NonRole;
+	sub zzz :NonRole { 1 };
+}
 
+{
+	package Local::Class;
+	use Moo;
+	with qw< Local::Role >;
+}
+
+my $o = Local::Class->new;
+ok not $o->can('zzz');