cleaned up the class_construct_instance handleing so that it works like construct...
[gitmo/Class-MOP.git] / examples / InsideOutClass.pod
index 5ea7e78..d82cd03 100644 (file)
@@ -19,7 +19,7 @@ sub construct_instance {
     foreach my $attr ($class->compute_all_applicable_attributes()) {
         # if the attr has an init_arg, use that, otherwise,
         # use the attributes name itself as the init_arg
-        my $init_arg = $attr->has_init_arg() ? $attr->init_arg() : $attr->name;
+        my $init_arg = $attr->init_arg();
         # try to fetch the init arg from the %params ...
         my $val;        
         $val = $params{$init_arg} if exists $params{$init_arg};