Toby Inkster  committed e6fc0b4

document a problem with some older versions of Perl; prevent test case triggering it (and make it more useful)

  • Participants
  • Parent commits 002e8fd
  • Branches default

Comments (0)

Files changed (2)

File lib/Sub/

 can cause a warning to be issued in the global cleanup phase. This is
 unlikely to result in serious problems; it's just annoying.
+In older Perls (before 5.10.1 I believe), importing Sub::Role into a package
+without actually applying the attribute to any subs can cause a crash with
+the error message I<< Internal error: Your::Package symbol went missing >>.
+Once you've applied the C<:NonRole> attribute to a sub, everything should be
 Please report any other bugs to
 use Test::More tests => 1;
-package Foo;
-use Moo::Role;
-use Sub::NonRole;
+	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');