Created
May 25, 2012 15:02
-
-
Save berekuk/2788626 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
| #!/usr/bin/perl | |
| use lib 'lib'; | |
| use Test::More; | |
| use Test::Fatal; | |
| { | |
| package R1; | |
| use Role::Tiny; | |
| sub foo {} | |
| } | |
| { | |
| package R2; | |
| use Role::Tiny; | |
| sub foo {} | |
| } | |
| { | |
| package X; | |
| sub new { | |
| bless {} => shift | |
| } | |
| } | |
| $INC{"R1.pm"} = __FILE__; | |
| $INC{"R2.pm"} = __FILE__; | |
| TODO: { | |
| local $TODO = 'roles are applying sequentially by now'; | |
| ok(exception { Role::Tiny->apply_roles_to_object(X->new, "R1", "R2") }, 'apply conflicting roles to object'); | |
| } | |
| done_testing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment