On Sep 14, 2010, at 9:15 AM, Ovid wrote:
----- Original Message ----
From: "Fuji, Goro" <[email protected]>
Here is a RT ticket to Mouse:
https://rt.cpan.org/Public/Bug/Display.html?id=61312
Applying roles after the fact changes the flow of method
modifiers. It
seems that application order takes precedence over the actual
modifier
type.
This issue he reported occurs not only on Mouse, but also on Moose.
Is this really a problem? We should resolve it?
In the original traits papers, it was thought that roles would only
provide pure
methods and not have access to state. They later realized that this
was a
mistake and admit that accessing state is important. However, method
modifiers
makes this a bit tricky as you've noted. In fact, method modifiers
open up a
whole can o' worms, particularly when you're applying roles at
runtime.
I totally agree, and if I had to do it over again, I would not have
allowed method modifiers in roles. They ruin the unordered-ness of
roles and bring about edge cases like this that are not so easily
solved.
- Stevan