Skip Menu |

This queue is for tickets about the MooseX-HasDefaults CPAN distribution.

Report information
The Basics
Id: 88935
Status: new
Priority: 0/
Queue: MooseX-HasDefaults

Owner: Nobody in particular
Requestors: ovid [...]

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

Subject: Doesn't play well with traits
Download (untitled) / with headers
text/plain 922b
The following code works correctly, but issues warnings: use 5.010; { package Foo; use Moose; use MooseX::HasDefaults::RO; has "some_value" => ( traits => ['Counter'], isa => 'Int', default => 0, handles => { "inc_some_value" => 'inc' }, ); } my $foo = Foo->new; $foo->inc_some_value; say $foo->some_value; That outputs: The some_value method in the Foo class was automatically created by the native delegation trait for the some_value attribute. This "default is" feature is deprecated. Explicitly set "is" or define accessor names to avoid this at line 16. 1 I use traits fairly extensively and fatal warnings make my life a bit sad when this happens :) Moose version 2.0801. MooseX::HasDefaults version 0.03 Perl version 5.10.1 Cheers, Ovid

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to