Skip to content

Instantly share code, notes, and snippets.

@berekuk
Created May 25, 2012 15:02
Show Gist options
  • Select an option

  • Save berekuk/2788626 to your computer and use it in GitHub Desktop.

Select an option

Save berekuk/2788626 to your computer and use it in GitHub Desktop.
#!/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