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