Skip to content

Instantly share code, notes, and snippets.

@autarch
Created January 18, 2016 21:54
Show Gist options
  • Select an option

  • Save autarch/e4f652e327a8e49f3ee7 to your computer and use it in GitHub Desktop.

Select an option

Save autarch/e4f652e327a8e49f3ee7 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use v5.20;
{
package RoleA;
use Moose::Role;
requires 'foo';
}
{
package RoleB;
use Moose::Role;
with 'RoleA';
sub foo { 42 }
}
{
package Class;
use Moose;
with 'RoleB';
}
say Class->new->foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment