Moose compat: the details of load_class. Check whether the package has any methods...
[gitmo/Mouse.git] / lib / Mouse / Object.pm
index 64f2ce4..4af0f39 100644 (file)
@@ -12,7 +12,7 @@ sub new {
     my %args  = @_;
     my $instance = bless {}, $class;
 
-    for my $attribute ($class->meta->attributes) {
+    for my $attribute (values %{ $class->meta->get_attribute_map }) {
         my $key = $attribute->init_arg;
         my $default;