Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 109844
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: zhouzhen1 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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!
I created a pull request here to fix this issue: https://github.com/moose/Moo/pull/25 On Sat Nov 28 04:40:00 2015, zhouzhen1@gmail.com wrote: Show quoted text
> 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!
This is fixed in the repo.
Fixed in 2.002002.