Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 99225
Status: new
Priority: 0/
Queue: Moo

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

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



Subject: extends with multiple args not setting attribute defaults properly for second arg
NB: I understand multi-arg extends() is a bad idea. However... If I have a class that extends two other classes, the attributes from the first argument are fine, but the second argument never has its attribute defaults set. I've attached a very simple test case.
Subject: multi-extends-default.pl
package A; use Moo; has 'a' => ( is => 'rw', default => 0 ); package B; use Moo; has 'b' => ( is => 'rw', default => 0 ); package C; use Moo; extends 'A', 'B'; package main; use Test::More tests => 2; my $c = C->new; is( $c->a, 0, 'accessor from A' ); is( $c->b, 0, 'accessor from B' );