Skip Menu |
 

This queue is for tickets about the Role-Tiny CPAN distribution.

Report information
The Basics
Id: 91054
Status: resolved
Priority: 0/
Queue: Role-Tiny

People
Owner: Nobody in particular
Requestors: mail [...] tobyinkster.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.003003

Attachments


Subject: Method conflicts and superclasses - differs from Moose/Mouse
Download (untitled) / with headers
text/plain 348b
Role::Tiny (and thus Moo::Role) differs from Moose in how it treats superclass methods when resolving role method conflicts. Mouse used to behave the same as Role::Tiny/Moo::Role, but since 2.0.0 has followed the Moose way (albeit with a loud and unpleasant warning!) The difference in behaviour should either be fixed, or noted in documentation.
Subject: moose-conflict-resolved-by-superclass.t
use strict; use warnings; use Test::More; { package Role::Foo1; use Moose::Role; sub foo { 'foo1' } package Role::Foo2; use Moose::Role; sub foo { 'foo2' } package BarSuper; use Moose; sub foo { 'foo3' } package BarSub; use Moose; extends qw(BarSuper); with 'Role::Foo1', 'Role::Foo2'; } is(BarSub->new->foo, "foo3"); done_testing;
Subject: mouse-conflict-resolved-by-superclass.t
use strict; use warnings; use Test::More; { package Role::Foo1; use Mouse::Role; sub foo { 'foo1' } package Role::Foo2; use Mouse::Role; sub foo { 'foo2' } package BarSuper; use Mouse; sub foo { 'foo3' } package BarSub; use Mouse 2; extends qw(BarSuper); with 'Role::Foo1', 'Role::Foo2'; } is(BarSub->new->foo, "foo3"); done_testing;
Subject: role-tiny-conflict-resolved-by-superclass.t
use strict; use warnings; use Test::More; { package Role::Foo1; use Role::Tiny; sub foo { 'foo1' } package Role::Foo2; use Role::Tiny; sub foo { 'foo2' } package BarSuper; sub new { bless [], shift }; sub foo { 'foo3' } package BarSub; use parent -norequire, qw(BarSuper); use Role::Tiny::With; with 'Role::Foo1', 'Role::Foo2'; } is(BarSub->new->foo, "foo3"); done_testing;
Fixed in 1.003003.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.