Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 93248
Status: open
Priority: 0/
Queue: Moose

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

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

Subject: composing attribute and method with the same name: not an error
Download (untitled) / with headers
text/plain 492b
package Dog; use Moose::Role; has('name', isa => 'Str', is => 'ro', default => 'Fido'); sub bark { my ($self, $noise) = @_; $noise //= 'bowwow'; return "$noise!"; } package Tree; use Moose::Role; use Moose::Util::TypeConstraints 'enum'; enum 'bark_t', [qw(rough smooth peeling)]; has('bark', isa => 'bark_t', is => 'ro', default => 'peeling'); package Farm; use Moose; with 'Tree', 'Dog'; package main; use 5.010; say Farm->new->bark; # got: peeling, expect: composition error
Download (untitled) / with headers
text/plain 106b
Very similar problem to and the fix is probably the same.

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

Please report any issues with to