Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 47210
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: ovid [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.81
Fixed in: (no value)



Subject: Method conflict error messages should report all methods in conflict
Not a bug per se, but it might be nice to improve the error message this throws: { package Bomb; use Moose::Role; sub fuse { print "Bomb explode\n" } sub explode { print "Bomb fuse\n" } } { package Spouse; use Moose::Role; sub fuse { print "Spouse explode\n" } sub explode { print "Spouse fuse\n" } } { package PracticalJoke; use Moose; with qw(Bomb Spouse); } This generates the following error: "Due to a method name conflict in roles 'Bomb' and 'Spouse', the method 'fuse' must be implemented or excluded by 'PracticalJoke'". However, explode() method is also in conflict. It would be helpful to list all conflicts up front rather than require the programmer to fix each one and keep rerunning the code until they're all found. Cheers, Ovid
Hi Ovid, The next release of Moose will improve this. In this particular case, both methods fuse and explode will be reported in the error. In more complex cases, such as four roles, A B C D, where A conflicts with B and C conflicts with D, only one set of conflicts will be reported. Trying to report all conflicts would be messy and way too noisy. Shawn