Created
January 18, 2016 21:54
-
-
Save autarch/e4f652e327a8e49f3ee7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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