Search Discussions

713 discussions - 2,897 posts

I've translated some code using multiple inheritance to Moo, and am seeing some unexpected behavior, namely that attributes inherited from the second parent class are not properly initialized. I've ...

Hi! I've attached some example code which exhibits (to my thinking) an unexpected collision between inheritance and composition. I'm using Moo v. 1.006001. There is a base role (R0) which provides a ...

If a role specifies a requires value, that value must be provided in the consuming class. It cannot be provided in a consuming role. It cannot be provided in a separate role that is loaded earlier in ...

If you have a role and its consumer both specify the same attribute name (neither one using +name) there is no complaint from Moose and the second one encountered is used and the first is ignored. I ...

I'm going to build a request with HTTP::Request::Common and want to use its existing methods (POST, PUT, GET, etc.) I'm curious how to control the error message better when coercing. My class gets an ...

The error exception: Role 'XXX|YYY|ZZZ' has encountered a class attribute conflict during composition. This is a fatal error and cannot be disambiguated. is not very helpful. Which attribute had the ...

Hello, I have been working on an IDL to Moose translator, and would like some advice on the implementation style. The framework is: * parse the OMG IDL 3.5 grammar with Marpa * produce an AST of it * ...

I'm using Moo and would like to override a default value for a composed attribute after composing the role. This works (with Moose as well): use Moo; package R { use Moo::Role; has a = ( is = 'ro', ...

I had what I thought was a nice clean implementation that factored out the coercion I wanted into a single place (to avoid having to re-write it in many places), but it doesn't seem to be allowed.. ...

Hello all- Some context: I have a web application with a fair bit of code for validating data (mostly from form fields). Most of that data eventually ends up in attributes of some Moose class, which ...

Hello again- I have an entire family of foreign classes that I would like to shim or wrap, so that I have another layer of indirection between my app and those classes. The foreign classes all happen ...

Hi all- I've begun using Roles to declare interfaces -- that is, nothing more than a list of "requires". So let's say I have a Role that requires 15 attributes/methods. In the implementation, I know ...

Hi, I was wondering if there is a way to use moose to check if an attribute has a value; As background, I am writing a function that, given an object, will loop over that objects attribute, and print ...

I just heard that there has been talk of changing the default stringification of Moose exceptions to emulate croak instead of confess. That is: don't include the complete stack trace, only one line ...