New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble creating method modifiers for attribute accessors in Moose roles #36
Comments
I'll be looking into this today. |
I see the problem: I'm trying to catch an error before Moose throws it, but determining that error for roles is practically impossible. I think the right approach is to not to try to catch this error at all; in this particular case, our error isn't particularly nicer than Moose's anyway. So I'll just take out my check and let Moose error out if it wants to, or not if it doesn't. I'll work up some failing tests and a fix and commit that tonight or tomorrow at the latest. |
we were trying to catch the case where adding a method modifier for a non-existent method threw a Moose error then we threw our own error unfortnately, it's *okay* to add a method modifier for a non-existent method in a role (just not a class) and, anyway, our error message wasn't that much cooler than Moose's so just removing the custom error and letting Moose decided when to err out and when not to
This looks to be fixed. I'll try to get out a dev release with the fix by the end of the day. |
Dev release that fixes this issue is up now. |
The following dies with "cannot create after modifier in package Foo for non-existent method foo at...":
It works with MooseX::Method::Signatures.
The text was updated successfully, but these errors were encountered: