Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 66507
Status: rejected
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

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



Subject: constructor accepts attributes that haven't been declared
The constructor doesn't throw an error if fed an undeclared attribute. For example, package P; use Moo; has opt => ( is => 'ro' ); my $x = P->new( frank => 3 ); $x is created without complaint. I expected new to croak. Thanks, Diab
This is a misunderstanding on my part of what is accepted as arguments in the constructor. It wasn't obvious from my perusal of the Moo/se docs that non-attribute parameters could also be passed in.
On Fri Mar 11 10:12:47 2011, DJERIUS wrote: Show quoted text
> This is a misunderstanding on my part of what is accepted as arguments > in the constructor. It wasn't obvious from my perusal of the Moo/se > docs that non-attribute parameters could also be passed in.
Marking bug as close then.