use strict;
use warnings;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use base 'Class::MOP::Class';
foreach my $current_class ($class->class_precedence_list()) {
$instance->{$current_class} = {}
unless exists $instance->{$current_class};
- my $meta = $class->initialize($current_class);
+ my $meta = $current_class->meta;
foreach my $attr_name ($meta->get_attribute_list()) {
my $attr = $meta->get_attribute($attr_name);
# 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{$current_class}->{$init_arg}
sub new {
my $class = shift;
- bless $class->meta->construct_instance(@_) => $class;
+ $class->meta->new_object(@_);
}
package Bar;