Subject: | strict_constructor |
Date: | Mon, 28 Mar 2011 14:48:28 +0200 |
To: | bug-mouse [...] rt.cpan.org |
From: | Peter Gordon <peter [...] pg-consultants.com> |
Hi,
In the program, examples/warns.pl there is meant to be a fatal error,
but there isn't one.
__PACKAGE__->meta->make_immutable(strict_constructor => 1);
package main;
# extra 'z' is supplied (FATAL)
my $point1 = Point->new(x => 5, y => 7, z => 9);
Changing it to two statements triggers the fatal error.
__PACKAGE__->meta->strict_constructor(1);
__PACKAGE__->meta->make_immutable;
Peter