my $instance = bless {}, $class;
- for my $attribute (values %{ $class->meta->get_attribute_map }) {
+ for my $attribute ($class->meta->compute_all_applicable_attributes) {
my $from = $attribute->init_arg;
my $key = $attribute->name;
my $default;
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 3;
do {
package Class;
my $obj = Child->new(class => 1, child => 1);
ok($obj->child, "local attribute set in constructor");
ok($obj->class, "inherited attribute set in constructor");
+
+is_deeply([Child->meta->compute_all_applicable_attributes], [
+ Child->meta->get_attribute('child'),
+ Class->meta->get_attribute('class'),
+], "correct compute_all_applicable_attributes");
+