Subject: | Ambiguous error message when not providing "required" attributes |
Date: | Sat, 28 Nov 2015 17:39:43 +0800 |
To: | bug-Moo [...] rt.cpan.org |
From: | Zhenyi Zhou <zhouzhen1 [...] gmail.com> |
Hi,
With latest Moo 2.000002, for a demo code like below,
{
package Foo;
use Moo;
has foo => (is => 'ro', required => 1);
}
my $foo = Foo->new();
It gives "Missing required arguments: foo at (eval 10) line 49."
This error message is ambiguous and is not telling the the position of the
exact problem. I wonder if we can improve this. Thanks!