Stevan Little wrote:
Perhaps you could explain the problem a little more, there might be another way to go about this.
has blah => ( isa => 'Foo', builder => '_build_blah', ); I was getting a constraint violation that appeared to come out of nowhere. It wasn't anywhere that was attempting to set the attribute or call a constructor. I couldn't tell where the error was coming from because the Moose error system doesn't include the complete stack. By making throw_error() confess() I was able to get the complete stack and tell that what was going wrong was that the attribute's value builder was returning undef. This isn't the first time I've had to do this in order to tell what was going on.