Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

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
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
Very similar problem to https://rt.cpan.org/Ticket/Display.html?id=83861 and the fix is probably the same.