Subject: | Privacy fails on private rw attributes |
Moose 1.07
perl 5.8.8 x86_64-linux-thread-multi
read-only attributes with trait 'Private' can be read by foreign classes.
Code to reproduce problem:
<snip>
{
package Foo;
use Moose;
use MooseX::Privacy;
has foo => (
is => 'ro',
isa => 'Str',
traits => [qw/ Private /],
);
}
my $o = Foo->new( foo => 'BooM!' );
print $o->foo
</snip>
The code survives and prints 'BooM!'