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


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.