Also see Moose::Manual::Delta for more details of, and workarounds
for, noteworthy changes.
+ [BUG FIXES]
+ * Moose::Meta::Attribute::Native::Trait::Code no longer creates reader
+ methods by default. (Florian Ragwitz)
+
0.99 Mon, Mar 8, 2010
[NEW FEATURES]
it documented here, or think we missed an important feature, please
send us a patch.
+=head1 1.00
+
+=over 4
+
+=item Moose::Meta::Attribute::Native::Trait::Code no longer creates reader methods by default
+
+Earlier versions of L<Moose::Meta::Attribute::Native::Trait::Code> created
+read-only accessors for the attributes it's been applied to, even if you didn't
+ask for it with C<< is => 'ro' >>. This incorrect behaviour has now been fixed.
+
+=back
+
=head1 0.95
=over 4
default => 'Moose::Meta::Attribute::Native::MethodProvider::Code',
);
-sub _default_is { 'ro' }
sub _helper_type { 'CodeRef' }
no Moose::Role;
has callback => (
traits => ['Code'],
- is => 'ro',
isa => 'CodeRef',
required => 1,
handles => { 'invoke_callback' => 'execute' },
has callback_method => (
traits => ['Code'],
- is => 'ro',
isa => 'CodeRef',
required => 1,
handles => { 'invoke_method_callback' => 'execute_method' },
has multiplier => (
traits => ['Code'],
- is => 'ro',
isa => 'CodeRef',
required => 1,
handles => { 'multiply' => 'execute' },
is($thingy->multiply(3), 6);
is($thingy->invoke_method_callback(3), 6);
+ok(!$thingy->can($_), "Code trait didn't create reader method for $_")
+ for qw(callback callback_method multiplier);
+
done_testing;