7 package Foo; use Class::Tiny; sub BUILD { push @ran, 'Foo' }
8 package Bar; use Class::Tiny; extends 'Foo'; sub BUILD { push @ran, 'Bar' }
9 package Baz; use Class::Tiny; extends 'Bar';
10 package Quux; use Class::Tiny; extends 'Baz'; sub BUILD { push @ran, 'Quux' }
15 is(ref($o), 'Quux', 'object returned');
16 is_deeply(\@ran, [ qw(Foo Bar Quux) ], 'BUILDs ran in order');