On Oct 29, 2009, at 11:29 PM, Evan Carroll wrote:
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.
That kind of sounds crazy.
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.
throw_error currently confesses, check Moose.pm
use Carp 'confess';
..
sub throw_error {
# FIXME This
shift;
goto \&confess
}
Furthermore, all sane people rely on Devel::SimpleTrace which makes
any warning or die dump the stack. I believe some of the mop and moose
set the stack level for Carp internally, and there might a problem
with that.
Yes, this was what we (in #moose-dev) were thinking it might be.
I still interested in your problem: your example doesn't
demonstrate anything.
Have to agree with Evan here, without a reproduce-able example we
can't turn it into a test and possibly fix it :)
- Stevan