Subject: | Display caller or callstack for type constraint errors |
Example:
~$ cat -n A.pl
1 use Moops;
2 class C {
3 method m ( Str $s ) { }
4 }
5 C->m(undef)
~$ perl A.pl
Undef did not pass type constraint "Str" at A.pl line 3
"Str" is a subtype of "Value"
"Value" is a subtype of "Defined"
Undef did not pass type constraint "Defined"
"Defined" is defined as: (defined($_))
~$
Caller is missing. And the type constraint check is more verbose than necessary.
I would like to request that the call stack is displayed instead, or at least calling line and for the type constraint error to be shorter. Suggestions:
--- snip ---
Undef did not pass type constraint "Str" at A.pl line 3
Call stack:
A.pl line 5
--- snap ---