Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

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

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

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
Download (untitled) / with headers
text/plain 264b
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.
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' );

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

Please report any issues with to