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...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|