I've translated some code using multiple inheritance to Moo, and am
seeing some unexpected  behavior, namely that attributes inherited
from the second parent class are not properly initialized.

I've attached simplified versions of the pre- and post- Moo code.  The
pre-Moo code generates this:

$ perl tst1
b1
b2

The Moo code outputs this:

$ perl tst2
b1
Use of uninitialized value in say at tst2 line 30.

In tst2, if I explicitly initialize the attribute from the second class:

  my $q = C11->new( b2 => 'BBB' );

It is still output as uninitialized.

Would someone please point out what I'm missing?

Thanks,

Diab

Attachment: tst1
Description: Binary data

Attachment: tst2
Description: Binary data

Reply via email to