I think the issue is more with Moo*'s infatuation with Java-like error backtraces, which are rarely helpful. In most cases you want the bottom-level call within the code you're working with, not the full call stack in the maze of anonymous subroutine helpers that the Moo* family is so fond of.
Now that I talk about it, maybe a judicious application of Carp's %Carp::Internal could help clean up those tracebacks to a more manageable state?
#!perl use strict; package foo; use Mouse; use Mouse::Util::TypeConstraints; # Converted to Mouse: enum 'ErrorMode' => qw<carp error both>; has 'error_mode' => ( is => 'rw', isa => 'ErrorMode', default => 'erro +r' ); package main; use strict; use Carp; $Carp::Internal{ 'Mouse::Util' } = 1; $Carp::Verbose = 0; my $foo = foo->new( error_mode => 'silent' );
This eliminates at least Mouse::Util from the list of the backtrace. Most likely, more of these need to be added...
In reply to Re^2: Non-fatal error handling with Mouse types?
by Corion
in thread Non-fatal error handling with Mouse types?
by wanna_code_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |